|
13 | 13 | RUST_BACKTRACE: full
|
14 | 14 |
|
15 | 15 | jobs:
|
16 |
| - Build: |
17 |
| - name: ${{ format('{0} {1}', matrix.platform.target, matrix.features)}} |
18 |
| - runs-on: ${{ matrix.platform.os }} |
19 |
| - strategy: |
20 |
| - fail-fast: false |
21 |
| - matrix: |
22 |
| - platform: |
23 |
| - - { target: aarch64-apple-darwin, os: macos-14, test: true } |
24 |
| - - { target: x86_64-apple-darwin, os: macos-13, test: true } |
25 |
| - - { target: x86_64-unknown-linux-gnu, os: ubuntu-24.04, test: true } |
26 |
| - - { target: x86_64-pc-windows-msvc, os: windows-latest, test: true } |
27 |
| - - { target: i686-pc-windows-msvc, os: windows-latest, test: false } |
28 |
| - - { target: aarch64-pc-windows-msvc, os: windows-latest, test: false } |
29 |
| - - { |
30 |
| - target: aarch64-unknown-linux-ohos, |
31 |
| - os: ubuntu-24.04, |
32 |
| - test: false, |
33 |
| - } |
34 |
| - - { target: arm-linux-androideabi, os: ubuntu-24.04, test: false } |
35 |
| - features: |
36 |
| - [ |
37 |
| - "", |
38 |
| - "chains sm-raw-window-handle-06", |
39 |
| - "chains sm-raw-window-handle-05", |
40 |
| - ] |
41 |
| - include: |
42 |
| - - features: "sm-x11 sm-wayland-default" |
43 |
| - platform: |
44 |
| - { target: x86_64-unknown-linux-gnu, os: ubuntu-24.04, test: true } |
45 |
| - - features: "chains sm-angle-builtin" |
46 |
| - platform: |
47 |
| - { target: x86_64-pc-windows-msvc, os: windows-latest, test: true } |
48 |
| - - features: "chains sm-no-wgl sm-angle-builtin" |
49 |
| - platform: |
50 |
| - { target: x86_64-pc-windows-msvc, os: windows-latest, test: true } |
51 |
| - steps: |
52 |
| - - uses: actions/checkout@v4 |
53 |
| - - name: Install dependencies (Linux) |
54 |
| - if: startsWith(matrix.platform.os, 'ubuntu') |
55 |
| - run: | |
56 |
| - sudo apt update |
57 |
| - sudo apt install gcc libxxf86vm-dev libosmesa6-dev libgles2-mesa-dev xvfb weston -y |
58 |
| - - name: Install rust |
59 |
| - id: toolchain |
60 |
| - uses: dtolnay/rust-toolchain@1.81.0 |
61 |
| - with: |
62 |
| - targets: ${{ matrix.platform.target }} |
63 |
| - - name: Build |
64 |
| - run: | |
65 |
| - cargo build --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
66 |
| - - name: Test |
67 |
| - if: ${{ matrix.platform.test && startsWith(matrix.platform.os, 'ubuntu') }} |
68 |
| - run: | |
69 |
| - weston --no-config --socket=wl-test-env --backend=headless & |
70 |
| - WAYLAND_DISPLAY=wl-test-env xvfb-run cargo test --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
71 |
| - - name: Test |
72 |
| - if: ${{ matrix.platform.test && !startsWith(matrix.platform.os, 'ubuntu') }} |
73 |
| - run: | |
74 |
| - cargo test --features "${{ matrix.features }}" --target ${{ matrix.platform.target }} |
75 |
| -
|
76 | 16 | android-test:
|
77 | 17 | name: ${{ format('x86_64-linux-android {0}', matrix.features)}}
|
78 | 18 | runs-on: ubuntu-24.04
|
@@ -115,24 +55,4 @@ jobs:
|
115 | 55 | script: |
|
116 | 56 | cargo dinghy all-platforms
|
117 | 57 | cargo dinghy all-devices
|
118 |
| - cargo dinghy -p auto-android-x86_64-api30 --env RUST_BACKTRACE=${{ env.RUST_BACKTRACE }} test --features "${{ matrix.features }}" -- --test-threads 1 |
119 |
| -
|
120 |
| - Format: |
121 |
| - name: Run `rustfmt` |
122 |
| - runs-on: ubuntu-24.04 |
123 |
| - steps: |
124 |
| - - uses: actions/checkout@v4 |
125 |
| - - uses: mkroening/rust-toolchain-toml@main |
126 |
| - - run: cargo fmt --check |
127 |
| - build_result: |
128 |
| - name: Result |
129 |
| - runs-on: ubuntu-24.04 |
130 |
| - needs: ["Build", "android-test", "Format"] |
131 |
| - if: always() |
132 |
| - steps: |
133 |
| - - name: Mark the job as successful |
134 |
| - if: ${{ !contains(needs.*.result, 'failure') && !contains(needs.*.result, 'cancelled') }} |
135 |
| - run: exit 0 |
136 |
| - - name: Mark the job as unsuccessful |
137 |
| - if: contains(needs.*.result, 'failure') || contains(needs.*.result, 'cancelled') |
138 |
| - run: exit 1 |
| 58 | + cargo dinghy -p auto-android-x86_64-api30 --env RUST_BACKTRACE=${{ env.RUST_BACKTRACE }} test --features "${{ matrix.features }}" -- --test-threads 1 --nocapture |
0 commit comments