Build GUI Artifacts #175
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build GUI Artifacts | |
on: | |
workflow_dispatch: | |
workflow_call: | |
jobs: | |
build: | |
name: Build | |
strategy: | |
matrix: | |
target: | |
- target: linux | |
os: ubuntu-latest | |
make: bash dist/build-linux.sh | |
artifact_path: "target/release/artifact/*" | |
- target: windows | |
os: windows-latest | |
make: powershell dist/build-windows.ps1 | |
artifact_path: "target/release/artifact/*" | |
- target: macos | |
os: macos-latest | |
make: bash dist/build-macos.sh | |
artifact_path: "target/release/artifact/*" | |
- target: macos-silicon | |
os: macos-latest | |
make: | | |
softwareupdate --install-rosetta | |
rustup target add aarch64-apple-darwin | |
rustup default stable-aarch64-apple-darwin | |
bash dist/build-macos.sh silicon | |
artifact_path: "target/release/artifact/*" | |
runs-on: ${{ matrix.target.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: dtolnay/rust-toolchain@stable | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target | |
key: ${{ runner.os }}-release-${{ hashFiles('**/Cargo.lock') }} | |
restore-keys: ${{ runner.os }}-release- | |
- name: Build | |
run: ${{ matrix.target.make }} | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ matrix.target.target }} | |
path: ${{ matrix.target.artifact_path }} |