fix: download sidecar first, fall back to committed binary #24
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 | |
| on: | |
| push: | |
| branches: [main, v2] | |
| pull_request: | |
| branches: [main, v2] | |
| workflow_dispatch: | |
| inputs: | |
| display_dj_cli_version: | |
| description: 'display-dj-cli version to use (e.g. v0.4.1). Leave empty for default from package.json.' | |
| required: false | |
| default: '' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| include: | |
| - platform: macos-latest | |
| target: aarch64-apple-darwin | |
| artifact_name: macOS (Apple Silicon ARM64) | |
| - platform: macos-latest | |
| target: x86_64-apple-darwin | |
| artifact_name: macOS (Intel x64) | |
| - platform: windows-latest | |
| target: x86_64-pc-windows-msvc | |
| artifact_name: Windows (x64) | |
| - platform: ubuntu-22.04 | |
| target: x86_64-unknown-linux-gnu | |
| artifact_name: Linux (x64) | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| - name: Setup Rust | |
| uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: ${{ matrix.target }} | |
| - name: Install Linux dependencies | |
| if: matrix.platform == 'ubuntu-22.04' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libwebkit2gtk-4.1-dev \ | |
| libappindicator3-dev \ | |
| librsvg2-dev \ | |
| patchelf \ | |
| libxdo-dev \ | |
| libssl-dev | |
| - name: Install dependencies | |
| run: npm install | |
| - name: Run frontend tests | |
| run: npm test | |
| - name: Run Rust tests | |
| working-directory: src-tauri | |
| shell: bash | |
| env: | |
| DISPLAY_DJ_CLI_VERSION: ${{ github.event.inputs.display_dj_cli_version }} | |
| run: | | |
| if [[ "${{ matrix.platform }}" == "windows-latest" ]]; then | |
| # Skip integration smoke test on Windows CI — Dxva2.dll (DDC/CI) is not | |
| # available on Server SKUs, so the smoke binary crashes at load time. | |
| cargo test --target ${{ matrix.target }} --lib | |
| else | |
| cargo test --target ${{ matrix.target }} | |
| fi | |
| - name: Build Tauri app | |
| uses: tauri-apps/tauri-action@v0 | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| DISPLAY_DJ_CLI_VERSION: ${{ github.event.inputs.display_dj_cli_version }} | |
| with: | |
| args: --target ${{ matrix.target }} | |
| - name: Upload bundle artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.artifact_name }} | |
| path: | | |
| src-tauri/target/${{ matrix.target }}/release/bundle/dmg/*.dmg | |
| src-tauri/target/${{ matrix.target }}/release/bundle/macos/*.app | |
| src-tauri/target/${{ matrix.target }}/release/bundle/nsis/*.exe | |
| src-tauri/target/${{ matrix.target }}/release/bundle/msi/*.msi | |
| src-tauri/target/${{ matrix.target }}/release/bundle/deb/*.deb | |
| src-tauri/target/${{ matrix.target }}/release/bundle/appimage/*.AppImage | |
| src-tauri/target/${{ matrix.target }}/release/bundle/rpm/*.rpm | |
| compression-level: 9 | |
| if-no-files-found: ignore |