Skip to content

Commit 1041987

Browse files
committed
chore: add gnullvm cross check to the CI
1 parent 6aa771c commit 1041987

File tree

1 file changed

+56
-20
lines changed

1 file changed

+56
-20
lines changed

.github/workflows/test.yml

Lines changed: 56 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ on:
55
branches:
66
- master
77
paths-ignore:
8-
- '*.mkd'
9-
- 'LICENSE'
8+
- "*.mkd"
9+
- "LICENSE"
1010
pull_request:
1111
types: [opened, reopened, synchronize]
1212
workflow_dispatch:
@@ -20,8 +20,8 @@ jobs:
2020
matrix:
2121
rust_toolchain: [nightly, stable, 1.63.0]
2222
os: [ubuntu-latest, windows-latest, macOS-latest]
23-
mode: ['--release', '-Zminimal-versions', '']
24-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
23+
mode: ["--release", "-Zminimal-versions", ""]
24+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
2525
exclude:
2626
- rust_toolchain: stable
2727
mode: -Zminimal-versions
@@ -53,7 +53,7 @@ jobs:
5353
strategy:
5454
fail-fast: false
5555
matrix:
56-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
56+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
5757
rust_target:
5858
- x86_64-pc-windows-msvc
5959
- i686-pc-windows-msvc
@@ -93,7 +93,7 @@ jobs:
9393
rust_target:
9494
- x86_64-pc-windows-gnu
9595
- i686-pc-windows-gnu
96-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
96+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
9797
include:
9898
- rust_target: x86_64-pc-windows-gnu
9999
mingw_path: C:/msys64/mingw64/bin
@@ -121,6 +121,42 @@ jobs:
121121
command: test
122122
args: --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }}
123123

124+
cross-windows-gnullvm-check:
125+
name: Check ${{ matrix.manifest }} to ${{ matrix.rust_target }} with stable
126+
runs-on: ubuntu-latest
127+
env:
128+
LLVM_MINGW_VERSION: "20241030"
129+
strategy:
130+
fail-fast: false
131+
matrix:
132+
rust_target:
133+
- aarch64-pc-windows-gnullvm
134+
- i686-pc-windows-gnullvm
135+
- x86_64-pc-windows-gnullvm
136+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
137+
steps:
138+
- uses: actions/checkout@v2
139+
- uses: actions/cache@v2
140+
with:
141+
path: llvm-mingw-version
142+
key: ${{ env.LLVM_MINGW_VERSION }}
143+
- name: Install llvm-mingw
144+
if: steps.cache.outputs.cache-hit != 'true'
145+
run: curl -L https://github.com/mstorsjo/llvm-mingw/releases/download/${{ env.LLVM_MINGW_VERSION }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64.tar.xz | tar xJf -
146+
- name: Add llvm-mingw to PATH
147+
run: echo "${{ github.workspace }}/llvm-mingw-${{ env.LLVM_MINGW_VERSION }}-ucrt-ubuntu-20.04-x86_64/bin" >> $GITHUB_PATH
148+
- name: Install Rust
149+
uses: actions-rs/toolchain@v1
150+
with:
151+
toolchain: stable
152+
profile: minimal
153+
target: ${{ matrix.rust_target }}
154+
- name: Check
155+
uses: actions-rs/cargo@v1
156+
with:
157+
command: check
158+
args: --target ${{ matrix.rust_target }} --manifest-path=${{ matrix.manifest }}
159+
124160
cross-linux-test:
125161
name: Test ${{ matrix.manifest }} on ${{ matrix.rust_target }} with nightly ${{ matrix.mode }}
126162
runs-on: ubuntu-latest
@@ -146,8 +182,8 @@ jobs:
146182
# https://github.com/rust-embedded/cross/pull/440
147183
# - powerpc64-unknown-linux-gnu
148184
- x86_64-unknown-linux-musl
149-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
150-
mode: ['--release', '-Zminimal-versions', '']
185+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
186+
mode: ["--release", "-Zminimal-versions", ""]
151187
timeout-minutes: 10
152188
steps:
153189
- uses: actions/checkout@v2
@@ -175,7 +211,7 @@ jobs:
175211
# BSDs: could be tested with full system emulation
176212
- i686-unknown-freebsd
177213
- x86_64-unknown-freebsd
178-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
214+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
179215
timeout-minutes: 10
180216
steps:
181217
- uses: actions/checkout@v2
@@ -214,7 +250,7 @@ jobs:
214250
# - sparc64-unknown-linux-gnu
215251
# BSDs: could be tested with full system emulation
216252
- x86_64-unknown-netbsd
217-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
253+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
218254
timeout-minutes: 10
219255
steps:
220256
- uses: actions/checkout@v2
@@ -242,7 +278,7 @@ jobs:
242278
rust_target:
243279
- aarch64-apple-ios
244280
- x86_64-apple-ios
245-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
281+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
246282
timeout-minutes: 10
247283
steps:
248284
- uses: actions/checkout@v2
@@ -268,8 +304,8 @@ jobs:
268304
rust_target:
269305
- x86_64-pc-windows-msvc
270306
- i686-pc-windows-msvc
271-
manifest: ['psm/Cargo.toml', 'Cargo.toml']
272-
xwin_version: ['0.1.6']
307+
manifest: ["psm/Cargo.toml", "Cargo.toml"]
308+
xwin_version: ["0.1.6"]
273309
timeout-minutes: 10
274310
steps:
275311
- uses: actions/checkout@v2
@@ -298,17 +334,17 @@ jobs:
298334
xwin --accept-license 1 splat --output /tmp/xwin
299335
- name: Test
300336
env:
301-
CC: 'clang-cl'
302-
CXX: 'clang-cl'
303-
AR: 'llvm-lib'
304-
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: 'lld-link'
305-
CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER: 'lld-link'
337+
CC: "clang-cl"
338+
CXX: "clang-cl"
339+
AR: "llvm-lib"
340+
CARGO_TARGET_X86_64_PC_WINDOWS_MSVC_LINKER: "lld-link"
341+
CARGO_TARGET_I686_PC_WINDOWS_MSVC_LINKER: "lld-link"
306342
# Note that we only disable unused-command-line-argument here since clang-cl
307343
# doesn't implement all of the options supported by cl, but the ones it doesn't
308344
# are _generally_ not interesting.
309-
CFLAGS: '-Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared'
345+
CFLAGS: "-Wno-unused-command-line-argument -fuse-ld=lld-link /imsvc/tmp/xwin/crt/include /imsvc/tmp/xwin/sdk/include/ucrt /imsvc/tmp/xwin/sdk/include/um /imsvc/tmp/xwin/sdk/include/shared"
310346
# Inform the linker where to search for libraries
311-
RUSTFLAGS: '-Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64'
347+
RUSTFLAGS: "-Lnative=/tmp/xwin/crt/lib/x86_64 -Lnative=/tmp/xwin/sdk/lib/um/x86_64 -Lnative=/tmp/xwin/sdk/lib/ucrt/x86_64"
312348
run: |
313349
set -eux
314350
cargo build --target ${{ matrix.rust_target }} --manifest-path ${{ matrix.manifest }}

0 commit comments

Comments
 (0)