b1be9d63dc
Multi-Platform CI / test-platforms (ubuntu-22.04) (push) Successful in 22s
Multi-Platform CI / test-platforms (windows-latest) (push) Successful in 18s
Multi-Platform CI / Package for Linux x86_64 (push) Successful in 58s
Multi-Platform CI / Package for Windows x86_64 (push) Successful in 54s
51 lines
1.4 KiB
YAML
51 lines
1.4 KiB
YAML
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 |