name: Multi-Platform CI on: push: pull_request: jobs: # Test on platforms with native builds only test-platforms: strategy: fail-fast: false matrix: include: # Linux native - os: ubuntu-22.04 # Windows native - os: windows-latest uses: ./.gitea/workflows/ci-reusable.yml with: os: ${{ matrix.os }} upload-artifacts: false # Package for distribution (only on master) package: if: github.event_name == 'push' && (github.ref == 'refs/heads/master' || github.ref == 'refs/heads/main') needs: [test-platforms] # Both jobs run on ubuntu, but with different targets runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: include: # Configuration for the native Linux build - name: Linux x86_64 target: 'x86_64-unknown-linux-gnu' # An empty target means native build # Configuration for the Windows cross-compile build - name: Windows x86_64 target: 'x86_64-pc-windows-gnu' name: Package for ${{ matrix.name }} uses: ./.gitea/workflows/ci-reusable.yml with: # Both jobs are sent to an ubuntu runner os: ubuntu-22.04 # The target is passed to the reusable workflow target: ${{ matrix.target }} upload-artifacts: true package-only: true