Skip to content

Commit c99cb31

Browse files
authored
Merge pull request #3594 from Shopify/vs_fix_windows_build
Add OS matrix to Rust build and upgrade bindgen
2 parents e5884cd + 3251900 commit c99cb31

14 files changed

Lines changed: 160 additions & 325 deletions

File tree

.github/workflows/documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- name: Set up Rust
2424
uses: dtolnay/rust-toolchain@master
2525
with:
26-
toolchain: "1.71.1"
26+
toolchain: stable
2727
- name: Install doxygen and dependencies
2828
run: |
2929
sudo apt-get update

.github/workflows/rust-bindings.yml

Lines changed: 13 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -20,19 +20,21 @@ jobs:
2020
name: cargo:test
2121
strategy:
2222
fail-fast: false
23-
runs-on: ubuntu-latest
23+
matrix:
24+
os: [ubuntu-latest, macos-latest, windows-latest]
25+
runs-on: ${{ matrix.os }}
2426
steps:
2527
- uses: actions/checkout@v4
2628
- name: Set up Ruby
2729
uses: ruby/setup-ruby@v1
2830
with:
29-
ruby-version: head
31+
ruby-version: 3.4
3032
bundler-cache: true
3133
- name: Set up Rust
3234
uses: dtolnay/rust-toolchain@master
3335
with:
34-
toolchain: "1.71.1"
35-
targets: wasm32-wasi
36+
toolchain: stable
37+
targets: wasm32-wasip1
3638
- uses: actions/cache@v4
3739
with:
3840
path: |
@@ -45,7 +47,9 @@ jobs:
4547
${{ runner.os }}-cargo
4648
- name: Run tests
4749
run: bundle exec rake cargo:test
50+
4851
- name: Run examples
52+
if: ${{ matrix.os != 'windows-latest' }}
4953
run: bundle exec rake cargo:examples
5054

5155
lint:
@@ -58,12 +62,12 @@ jobs:
5862
- name: Set up Ruby
5963
uses: ruby/setup-ruby@v1
6064
with:
61-
ruby-version: head
65+
ruby-version: 3.4
6266
bundler-cache: true
6367
- name: Set up Rust
6468
uses: dtolnay/rust-toolchain@master
6569
with:
66-
toolchain: "1.71.1"
70+
toolchain: stable
6771
components: clippy, rustfmt
6872
- uses: actions/cache@v4
6973
with:
@@ -92,13 +96,13 @@ jobs:
9296
- name: Set up Ruby
9397
uses: ruby/setup-ruby@v1
9498
with:
95-
ruby-version: head
99+
ruby-version: 3.4
96100
bundler-cache: true
97101
- name: rake cargo:build
98102
run: bundle exec rake cargo:build
99103
- uses: dtolnay/rust-toolchain@master
100104
with:
101-
toolchain: nightly-2023-10-24
105+
toolchain: nightly
102106
target: "x86_64-unknown-linux-gnu"
103107
components: "rust-src"
104108
- name: Test with sanitizer
@@ -124,7 +128,7 @@ jobs:
124128
# uses: dtolnay/rust-toolchain@master
125129
# with:
126130
# toolchain: "1.71.1"
127-
# targets: wasm32-wasi
131+
# targets: wasm32-wasip1
128132
# - uses: actions/cache@v4
129133
# with:
130134
# path: |

rakelib/cargo.rake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ namespace :cargo do
9797

9898
CRATES.each do |crate|
9999
Dir.chdir("rust/#{crate}") do
100-
sh("cargo +nightly-2023-10-24 test -Zbuild-std --target=#{current_target} -- --nocapture")
100+
sh("cargo +nightly test -Zbuild-std --target=#{current_target} -- --nocapture")
101101
end
102102
end
103103
ensure

0 commit comments

Comments
 (0)