version bump #27
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: Build for Linux, Windows and macOS | |
on: | |
push: | |
branches: [ main ] | |
tags: [ 'v*' ] | |
pull_request: | |
branches: [ main ] | |
env: | |
CARGO_TERM_COLOR: always | |
SUFFIX: ${{ github.ref_type == 'tag' && github.ref_name || github.sha }} | |
jobs: | |
build-linux-windows: | |
name: Build for Linux and Windows | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Dependencies | |
run: sudo apt install mingw-w64 | |
- name: Rustup update | |
run: rustup update | |
- name: Setup | |
run: make setup | |
- name: Build debug | |
run: make debug | |
- name: Build release | |
run: make release | |
- name: Gather artifacts | |
run: | | |
mkdir artifacts | |
mv debug release artifacts/ | |
- name: Upload artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: linux-windows | |
path: artifacts | |
retention-days: 0 | |
build-frontend-macos-arm64: | |
name: Build frontend for macOS arm64 | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup update | |
run: rustup update | |
- name: Build frontend debug | |
run: cd frontend ; cargo build --features=log | |
- name: Build frontend release | |
run: cd frontend ; cargo build --release | |
- name: Build standalone debug | |
run: cd standalone ; cargo build --features=log | |
- name: Build standalone release | |
run: cd standalone ; cargo build --release --features=log | |
- name: Gather artifacts | |
run: | | |
mkdir -p artifacts/debug/frontend/macos-arm64 | |
mv frontend/target/debug/libsoxy.dylib artifacts/debug/frontend/macos-arm64/ | |
mkdir -p artifacts/release/frontend/macos-arm64 | |
mv frontend/target/release/libsoxy.dylib artifacts/release/frontend/macos-arm64/ | |
mkdir -p artifacts/debug/standalone/macos-arm64 | |
mv standalone/target/debug/soxy_standalone artifacts/debug/standalone/macos-arm64/ | |
mkdir -p artifacts/release/standalone/macos-arm64 | |
mv standalone/target/release/soxy_standalone artifacts/release/standalone/macos-arm64/ | |
- name: Upload debug artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-arm64 | |
path: artifacts | |
retention-days: 0 | |
build-frontend-macos-x86_64: | |
name: Build frontend for macOS x86_64 | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Rustup update | |
run: rustup update | |
- name: Build frontend debug | |
run: cd frontend ; cargo build --features=log | |
- name: Build frontend release | |
run: cd frontend ; cargo build --release | |
- name: Build standalone debug | |
run: cd standalone ; cargo build --features=log | |
- name: Build standalone release | |
run: cd standalone ; cargo build --release --features=log | |
- name: Gather artifacts | |
run: | | |
mkdir -p artifacts/debug/frontend/macos-x86_64 | |
mv frontend/target/debug/libsoxy.dylib artifacts/debug/frontend/macos-x86_64/ | |
mkdir -p artifacts/release/frontend/macos-x86_64 | |
mv frontend/target/release/libsoxy.dylib artifacts/release/frontend/macos-x86_64/ | |
mkdir -p artifacts/debug/standalone/macos-x86_64 | |
mv standalone/target/debug/soxy_standalone artifacts/debug/standalone/macos-x86_64/ | |
mkdir -p artifacts/release/standalone/macos-x86_64 | |
mv standalone/target/release/soxy_standalone artifacts/release/standalone/macos-x86_64/ | |
- name: Upload debug artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: macos-x86_64 | |
path: artifacts | |
retention-days: 0 | |
package: | |
name: Package artifacts | |
runs-on: ubuntu-latest | |
needs: [ build-linux-windows, build-frontend-macos-arm64, build-frontend-macos-x86_64] | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/download-artifact@v4 | |
with: | |
merge-multiple: true | |
path: artifacts | |
- name: Gathering artifacts | |
run: | | |
mkdir -p debug/soxy-debug-${{ env.SUFFIX }} | |
mv artifacts/debug/* debug/soxy-debug-${{ env.SUFFIX }}/ | |
cp LICENSE README.md debug/soxy-debug-${{ env.SUFFIX }}/ | |
mkdir -p release/soxy-release-${{ env.SUFFIX }} | |
mv artifacts/release/* release/soxy-release-${{ env.SUFFIX }}/ | |
cp LICENSE README.md release/soxy-release-${{ env.SUFFIX }}/ | |
- name: Upload debug artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: soxy-debug-${{ env.SUFFIX }} | |
path: debug | |
- name: Upload release artifacts | |
uses: actions/upload-artifact@v4 | |
with: | |
name: soxy-release-${{ env.SUFFIX }} | |
path: release |