Build & Bundle #17
Workflow file for this run
This file contains hidden or 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 & Bundle" | |
| on: | |
| push: | |
| branches: | |
| - main | |
| workflow_dispatch: | |
| release: | |
| types: [published] | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: | |
| - ubuntu-22.04 | |
| - windows-latest | |
| - macos-latest | |
| - macos-15-intel | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Cache Rust dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cargo/registry | |
| ~/.cargo/git | |
| target | |
| key: ${{ matrix.platform }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-cargo- | |
| - name: Install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ (matrix.platform == 'macos-latest') && 'aarch64-apple-darwin' || '' }} | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install libgtk-3-dev libpng-dev libjpeg-dev libgl1-mesa-dev libglu1-mesa-dev libxkbcommon-dev libexpat1-dev libtiff-dev | |
| - name: Setup Windows dependencies | |
| if: runner.os == 'Windows' | |
| run: choco install strawberryperl make --no-progress | |
| - name: Setup MSVC environment | |
| if: runner.os == 'Windows' | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| - name: Build Dependencies | |
| run: | | |
| cargo install patch-crate | |
| cargo fetch --locked || true | |
| cargo patch-crate --force | |
| cargo install cargo-bundle | |
| - name: Build & Bundle (Linux) | |
| if: runner.os == 'Linux' | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --format rpm | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --format deb | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --format appimage | |
| - name: Build & Bundle (macOS) | |
| if: runner.os == 'macOS' | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --format dmg | |
| - name: Build & Bundle (Windows) | |
| if: runner.os == 'Windows' | |
| run: | | |
| cargo bundle --bin plumeimpactor --package plumeimpactor --format exe | |
| - name: Upload Bundles | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: plumeimpactor-${{ matrix.platform }} | |
| path: | | |
| target/bundle/*/*.{rpm,deb,AppImage,dmg,exe} |