cicd changes #28
Workflow file for this run
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: Cargo Release | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
jobs: | |
release: | |
name: "Release ${{ matrix.platform.os }} ${{ matrix.platform.target }}" | |
strategy: | |
fail-fast: false | |
matrix: | |
platform: | |
- { os: ubuntu-latest, target: x86_64-unknown-linux-gnu } | |
- { os: ubuntu-latest, target: x86_64-apple-darwin } | |
- { os: ubuntu-latest, target: aarch64-apple-darwin } | |
# - { os: ubuntu-latest, target: x86_64-unknown-linux-musl } # cpal needs libc. | |
- { os: macos-latest , target: x86_64-apple-darwin } | |
- { os: macos-latest , target: aarch64-apple-darwin } | |
runs-on: ${{ matrix.platform.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- run: | | |
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs > rustup.sh | |
chmod a+x rustup.sh | |
./rustup.sh -y | |
- run: rustc --print target-list | |
- run: rustup target add ${{ matrix.platform.target }} | |
- run: rustc --target=${{ matrix.platform.target }} --print target-cpus | |
- run: sudo apt-get update && sudo apt-get install libasound2-dev | |
if: ${{ matrix.platform.os == 'ubuntu-latest' }} | |
- run: cargo build --locked --release --target ${{ matrix.platform.target }} | |
- run: pwd | |
- run: tree target/x86_64-unknown-linux-gnu -L 2 | |
# - run: tar --version | |
# - run: tar czf jolteon.tar.gz --directory=./target/x86_64-unknown-linux-gnu/release jolteon | |
- uses: actions/upload-artifact@v4 | |
with: | |
# name: jolteon-x86_64-unknown-linux-gnu.tar.gz | |
name: jolteon-${{ matrix.platform.target }} | |
path: target/${{ matrix.platform.target }}/release/jolteon | |
# compression-level: 0 |