Skip to content

Commit

Permalink
Change GitHub Workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
ShayBox committed Nov 27, 2022
1 parent ba95843 commit a830f59
Show file tree
Hide file tree
Showing 3 changed files with 53 additions and 19 deletions.
66 changes: 50 additions & 16 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,24 +4,58 @@ on:

jobs:
release:
name: release ${{ matrix.target }}
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

strategy:
fail-fast: false
matrix:
include:
- target: x86_64-apple-darwin
archive: zip
- target: x86_64-pc-windows-gnu
archive: zip
- target: x86_64-unknown-linux-musl
archive: tar.gz
- name: Linux-x86_64
target: x86_64-unknown-linux-gnu
runner: ubuntu-latest

- name: macOS-Apple
target: aarch64-apple-darwin
runner: macos-latest

- name: macOS-Intel
target: x86_64-apple-darwin
runner: macos-latest

- name: Windows
target: i686-pc-windows-msvc
runner: windows-latest

name: ${{ matrix.name }}
runs-on: ${{ matrix.runner }}
steps:
- uses: actions/checkout@v3
- name: Compile and release
uses: rust-build/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
RUSTTARGET: ${{ matrix.target }}
ARCHIVE_TYPES: ${{ matrix.archive }}
- name: Fetch Repository
uses: actions/checkout@v3

- name: Update and Install Dependencies (Linux)
if: ${{ matrix.runner == 'ubuntu-latest' }}
run: |
sudo apt update
sudo apt upgrade -y
sudo apt install -y libdbus-1-dev
- name: Update Rust Toolchain
run: rustup update stable

- name: Add Rust Target
run: rustup target add ${{ matrix.target }}

- name: Build Release Binary
run: cargo build --release --target ${{ matrix.target }}

- name: Create Zip Archive (Windows)
if: ${{ matrix.runner == 'windows-latest' }}
run: bash -c '7z a ${{ matrix.name }}.zip ./target/${{ matrix.target }}/release/lighthouse.exe'

- name: Create Zip Archive (Other)
if: ${{ matrix.runner != 'windows-latest' }}
run: zip -j ${{ matrix.name }}.zip target/${{ matrix.target }}/release/lighthouse

- name: Upload Zip Archive
run: gh release upload ${{ github.ref_name }} ${{ matrix.name }}.zip --clobber
2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "lighthouse"
description = "VR Lighthouse power state management in Rust"
description = "Virtual reality basestation power management in Rust"
version = "1.0.0"
authors = ["Shayne Hartford <[email protected]>"]
edition = "2021"
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
</div>

# Lighthouse
VR Lighthouse power state management in Rust
Virtual reality basestation power management in Rust

## Usage

Expand All @@ -22,7 +22,7 @@ Options:
-q, --quiet... Less output per occurrence
-h, --help Print help information
```
V1 Lighthouse Basestations require an 8 character BSID found on the device.
V1 Basestations require an 8 character BSID found on the device.

## Example
V1: `$ lighthouse -s on -b aabbccdd`
Expand Down

0 comments on commit a830f59

Please sign in to comment.