aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows/ci.yml
blob: e0410c182574074972c5b0a9d60bce07f0c521a6 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
name: fparkan-ci

on:
  push:
    branches: [devel, main]
  pull_request:
    branches: [devel, main]
  workflow_dispatch:

jobs:
  msrv-backend-neutral:
    name: MSRV backend-neutral crates
    runs-on: ubuntu-latest
    timeout-minutes: 20
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      - uses: dtolnay/rust-toolchain@67ef31d5b988238dd797d409d6f9574278e20537
        with:
          toolchain: 1.87.0
      - name: Test backend-neutral crates
        run: >
          cargo test
          -p fparkan-animation
          -p fparkan-binary
          -p fparkan-corpus
          -p fparkan-diagnostics
          -p fparkan-fx
          -p fparkan-inspection
          -p fparkan-material
          -p fparkan-mission-format
          -p fparkan-msh
          -p fparkan-nres
          -p fparkan-path
          -p fparkan-platform
          -p fparkan-prototype
          -p fparkan-render
          -p fparkan-resource
          -p fparkan-rsli
          -p fparkan-runtime
          -p fparkan-terrain
          -p fparkan-terrain-format
          -p fparkan-texm
          -p fparkan-vfs
          -p fparkan-world
          --all-targets
          --locked

  stage0-matrix:
    name: Stage 0 CI (${{ matrix.os }})
    runs-on: ${{ matrix.os }}
    timeout-minutes: 30
    strategy:
      fail-fast: false
      matrix:
        include:
          - os: macos-latest
            smoke_platform: macos
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      - uses: dtolnay/rust-toolchain@67ef31d5b988238dd797d409d6f9574278e20537
        with:
          toolchain: 1.87.0
          components: clippy,rustfmt
      - name: Install cargo-deny
        run: cargo install cargo-deny --version 0.19.9 --locked
      - name: Run canonical CI gate
        run: cargo xtask ci
      - name: Run native Vulkan smoke
        run: >
          cargo run -p fparkan-vulkan-smoke --locked --
          --out "target/fparkan/native-smoke/${{ matrix.smoke_platform }}.json"
      - name: Upload acceptance audit
        if: always()
        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
        with:
          name: stage-0-acceptance-${{ matrix.os }}
          path: target/fparkan/acceptance/stage-0-audit.json
          if-no-files-found: error
      - name: Upload native smoke report
        if: always()
        uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02
        with:
          name: native-smoke-${{ matrix.smoke_platform }}
          path: target/fparkan/native-smoke/*.json
          if-no-files-found: error

  native-smoke-audit:
    name: Native smoke audit
    runs-on: ubuntu-latest
    timeout-minutes: 15
    needs: stage0-matrix
    env:
      CARGO_TERM_COLOR: always
    steps:
      - uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
      - uses: dtolnay/rust-toolchain@67ef31d5b988238dd797d409d6f9574278e20537
        with:
          toolchain: 1.87.0
      - uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093
        with:
          pattern: native-smoke-*
          path: target/fparkan/native-smoke-artifacts
          merge-multiple: true
      - name: Aggregate native smoke reports
        run: >
          cargo xtask native-smoke audit
          --dir target/fparkan/native-smoke-artifacts