name: Multi-Platform CI on: push: pull_request: jobs: # Test on all platforms test-platforms: strategy: fail-fast: false matrix: include: # Linux native and cross-compilation targets - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu - os: ubuntu-22.04 target: aarch64-unknown-linux-gnu # macOS native targets only (cross-compilation from macOS is limited) - os: macos-latest target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin # Windows native targets only - os: windows-latest target: x86_64-pc-windows-msvc uses: ./.gitea/workflows/ci-reusable.yml with: os: ${{ matrix.os }} target: ${{ matrix.target }} upload-artifacts: false # Test native builds (no cross-compilation) test-native: strategy: fail-fast: false matrix: os: [ubuntu-22.04, macos-latest, 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, test-native] strategy: matrix: include: - os: ubuntu-22.04 target: x86_64-unknown-linux-gnu - os: ubuntu-22.04 target: aarch64-unknown-linux-gnu - os: macos-latest target: x86_64-apple-darwin - os: macos-latest target: aarch64-apple-darwin - os: windows-latest target: x86_64-pc-windows-msvc uses: ./.gitea/workflows/ci-reusable.yml with: os: ${{ matrix.os }} target: ${{ matrix.target }} upload-artifacts: true