Skip to content

Try to consolidate more workflows #2

Try to consolidate more workflows

Try to consolidate more workflows #2

Workflow file for this run

name: Build macOS
on: {}
env:
CARGO_TERM_COLOR: always
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
jobs:
test-rust:
name: Rust - Run unit-tests on rust crates ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-cache-macos2"
cache-all-crates: true
cache-on-failure: true
- uses: subosito/flutter-action@v1
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"
- name: Cache cargo binaries
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin
- name: Install LLVM
run: brew install llvm
- name: Install cargo-nextest
run: |
ls ~/.cargo/bin/
if ! [ -x "$(command -v cargo-nextest)" ]; then
echo "::group::Installing cargo-nextest"
curl -LsSf https://get.nexte.st/latest/mac | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin
echo "::endgroup::"
fi
which cargo-nextest
- name: Run tests
run: ./scripts/test.sh
lint-rust:
name: Rust - Lint rust crates ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
- uses: subosito/flutter-action@v1
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-cache-macos2"
cache-all-crates: true
cache-on-failure: true
- name: Install LLVM
run: brew install llvm
- name: Run clippy
run: ./scripts/clippy.sh
build-rust:
name: Rust - Build release rust crates ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- uses: subosito/flutter-action@v1
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-cache-macos2"
cache-all-crates: true
cache-on-failure: true
- name: Cache cargo binaries
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin
- name: Install LLVM
run: brew install llvm
- name: Build release
run: cargo build --release --verbose --workspace --exclude augmented-ui --exclude midir
- name: Upload plugin-host binary
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-plugin-host
path: ./target/release/plugin-host
- name: Upload plugin-host-gui2 binary
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-plugin-host-gui2
path: ./target/release/plugin-host-gui2
- name: Upload tremolo-plugin dylib
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-libtas_v2-dylib
path: ./target/release/libtas_v2.dylib
- name: Validate license information
run: |
if ! [ -x "$(command -v cargo-about)" ]; then
cargo install cargo-about
fi
cargo about generate about.hbs
run-snapshot-tests:
name: Run snapshot tests
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"
- uses: subosito/flutter-action@v1
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-cache-macos2"
cache-all-crates: true
cache-on-failure: true
- name: Install ARM/x86 toolchains
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
- name: Install LLVM
run: brew install llvm
- name: Run snapshot tests
run: |
./scripts/dev.sh test-snapshots
- name: Upload snapshot test results
uses: actions/upload-artifact@v2
with:
name: ${{ runner.os }}-snapshot-tests
path: ./test
if: ${{ failure() }}
build-sequencer:
name: Build Continuous looper
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [macos-14]
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
lfs: true
- name: Run sccache-cache
uses: mozilla-actions/[email protected]
with:
version: "v0.4.0"
- uses: Swatinem/rust-cache@v2
with:
shared-key: "rust-cache-macos2"
cache-all-crates: true
cache-on-failure: true
- name: Cache cargo binaries
uses: actions/cache@v2
with:
path: |
~/.cargo/bin/
key: ${{ runner.os }}-cargo-bin
- name: Install cargo-lipo and cbindgen
run: |
if ! [ -x "$(command -v cargo-lipo)" ]; then
cargo install cargo-lipo
fi
if ! [ -x "$(command -v cbindgen)" ]; then
cargo install cbindgen
fi
- name: Install ARM/x86 toolchains
run: |
rustup target add aarch64-apple-darwin
rustup target add x86_64-apple-darwin
rustup target add aarch64-apple-ios-sim
rustup target add aarch64-apple-ios
- name: Install LLVM
run: brew install llvm
- name: Build looper universal libraries
run: |
cd ./crates/apps/looper/looper-processor
make
- uses: actions/cache@v2
name: "Cache: Swift Package Manager"
with:
path: ~/Library/Developer/Xcode/DerivedData/Sequencer-*/SourcePackages/
key: ${{ runner.os }}-spm
restore-keys: |
${{ runner.os }}-spm
- name: Run Sequencer.app tests
run: |
cd ./crates/apps/looper/Sequencer
brew install xcbeautify
make test