Skip to content

Commit dfc0db1

Browse files
committed
ci: change rust install to hopefully get msvc?
1 parent d736ed5 commit dfc0db1

1 file changed

Lines changed: 26 additions & 12 deletions

File tree

.github/workflows/rust.yml

Lines changed: 26 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -18,29 +18,30 @@ jobs:
1818
rust: [stable, nightly]
1919
cargo_features: ['', 'alloc', 'default']
2020

21+
env:
22+
CARGO_TERM_COLOR: always
23+
2124
steps:
22-
- uses: hecrj/setup-rust-action@v2
25+
- uses: dtolnay/rust-toolchain@master
2326
with:
24-
rust-version: ${{ matrix.rust }}
25-
targets: ${{ matrix.target }}
27+
toolchain: ${{ matrix.rust }}
2628
components: 'rustfmt, clippy'
2729

30+
- uses: Swatinem/rust-cache@v2
31+
with:
32+
env-vars: ROARING
33+
# Allow us to cache croaring-sys when it doesn't change
34+
cache-workspace-crates: true
35+
2836
- name: Install cargo tools
2937
uses: taiki-e/install-action@v2
3038
with:
3139
tool: cargo-hack,cargo-minimal-versions${{ matrix.os == 'ubuntu-latest' && ',cargo-fuzz' || '' }}
3240
if: matrix.rust == 'nightly' && matrix.cargo_features == 'default'
3341

3442
- uses: actions/checkout@v6
35-
36-
- name: Install LLVM
37-
if: matrix.os == 'windows-latest'
38-
run: choco upgrade llvm -y
39-
40-
- name: Set clang path
41-
if: matrix.os =='windows-latest'
42-
run: echo "LIBCLANG_PATH=C:\Program Files\LLVM\bin" >> $GITHUB_ENV
43-
shell: bash
43+
with:
44+
persist-credentials: false
4445

4546
- name: Cargo fmt
4647
run: cargo +${{ matrix.rust }} fmt --all -- --check
@@ -50,6 +51,19 @@ jobs:
5051
run: cargo +${{ matrix.rust }} clippy --all-targets --workspace --no-default-features --features "${{ matrix.cargo_features }}"
5152
if: matrix.os == 'ubuntu-latest' && matrix.rust == 'nightly' && matrix.cargo_features == 'default'
5253

54+
- name: Build Test
55+
run: cargo +${{ matrix.rust }} build -vv --tests --no-default-features --features "${{ matrix.cargo_features }}" --all-targets
56+
env:
57+
RUST_BACKTRACE: 1
58+
CC_ENABLE_DEBUG_OUTPUT: "1"
59+
60+
- name: Archive artifacts
61+
if: matrix.os == 'windows-latest'
62+
uses: actions/upload-artifact@v7
63+
with:
64+
name: built artifacts
65+
path: target/**/*.exe
66+
5367
- name: Test
5468
run: cargo +${{ matrix.rust }} test --no-default-features --features "${{ matrix.cargo_features }}" --all-targets
5569

0 commit comments

Comments
 (0)