Skip to content

Commit

Permalink
Update workflows, add macOS AArch64 build
Browse files Browse the repository at this point in the history
  • Loading branch information
kelpsyberry committed Jan 4, 2024
1 parent 99de14c commit d7fcafd
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 35 deletions.
67 changes: 49 additions & 18 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,32 +21,42 @@ jobs:
- os: windows-latest
artifact: Windows
artifact-extension: .exe
target: x86_64-pc-windows-msvc
- os: ubuntu-latest
artifact: Linux
target: x86_64-unknown-linux-gnu
- os: macos-latest
artifact: macOS
artifact: macOS-x86_64
target: x86_64-apple-darwin
- os: macos-latest
artifact: macOS-aarch64
target: aarch64-apple-darwin
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
override: true
components: clippy
target: ${{ matrix.target }}

- name: Cache dependencies and build directory
uses: actions/cache@v2
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target/
key: ${{ matrix.os }}-release
key: cargo-registry

- name: Cache build directory
uses: actions/cache@v3
with:
path: target/
key: ${{ matrix.target }}-release

- name: Install GTK and ALSA
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand All @@ -55,28 +65,49 @@ jobs:
sudo apt-get install libgtk-3-dev libasound2-dev
- name: Build release binary (no debugging features)
run: cargo build --profile ci --verbose --no-default-features --features=${{ env.RELEASE_FEATURES }} --package dust-desktop
run: >
cargo build
--verbose
--profile ci
--target ${{ matrix.target }}
--no-default-features
--features=${{ env.RELEASE_FEATURES }}
--package dust-desktop
- name: Upload release binary (no debugging features)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}
path: target/ci/dust-desktop${{ matrix.artifact-extension }}
path: target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }}

- name: Build release binary (debugging features)
run: cargo build --profile ci --verbose --no-default-features --features=${{ env.DEBUG_FEATURES }} --package dust-desktop
run: >
cargo build
--verbose
--profile ci
--target ${{ matrix.target }}
--no-default-features
--features=${{ env.DEBUG_FEATURES }}
--package dust-desktop
- name: Upload release binary (debugging features)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}-debug
path: target/ci/dust-desktop${{ matrix.artifact-extension }}
path: target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }}

- name: Build release binary (debugging features + GDB)
run: cargo build --profile ci --verbose --no-default-features --features=${{ env.DEBUG_GDB_FEATURES }} --package dust-desktop
run: >
cargo build
--verbose
--profile ci
--target ${{ matrix.target }}
--no-default-features
--features=${{ env.DEBUG_GDB_FEATURES }}
--package dust-desktop
- name: Upload release binary (debugging features + GDB)
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.artifact }}-debug-gdb
path: target/ci/dust-desktop${{ matrix.artifact-extension }}
path: target/${{ matrix.target }}/ci/dust-desktop${{ matrix.artifact-extension }}
21 changes: 12 additions & 9 deletions .github/workflows/deploy-web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,30 +15,33 @@ jobs:
runs-on: ubuntu-20.04

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
override: true
components: rust-src

- name: Setup Node
uses: actions/setup-node@v2
uses: actions/setup-node@v4
with:
node-version: '17'

- name: Cache dependencies and build directory
uses: actions/cache@v2
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target/
key: web
key: cargo-registry

- name: Cache build directory
uses: actions/cache@v3
with:
path: target/
key: web-release

- name: Build
working-directory: frontend/web
Expand Down
14 changes: 6 additions & 8 deletions .github/workflows/run-clippy-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:

env:
CARGO_TERM_COLOR: always
FEATURES: xq-audio,discord-presence,debug-views,log,pu-checks,gdb-server,dldi
FEATURES: xq-audio,discord-presence,log,debug-views,pu-checks,gdb-server,dldi
MACOSX_DEPLOYMENT_TARGET: 10.11

jobs:
Expand All @@ -19,25 +19,23 @@ jobs:
runs-on: ${{ matrix.os }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Install nightly toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@v1
with:
toolchain: nightly
override: true
components: clippy

- name: Cache dependencies and build directory
uses: actions/cache@v2
- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/bin
~/.cargo/registry/index
~/.cargo/registry/cache
~/.cargo/git/db
target/
key: ${{ matrix.os }}-clippy
key: cargo-registry

- name: Install GTK and ALSA
if: ${{ matrix.os == 'ubuntu-latest' }}
Expand Down

0 comments on commit d7fcafd

Please sign in to comment.