File tree Expand file tree Collapse file tree 5 files changed +18
-10
lines changed
Expand file tree Collapse file tree 5 files changed +18
-10
lines changed Original file line number Diff line number Diff line change @@ -10,16 +10,16 @@ inputs:
1010runs :
1111 using : composite
1212 steps :
13- - name : Install Rust
13+ - name : Select Rust
1414 shell : bash
1515 id : select
1616 run : |
17- # Determine MSRV as N in `1.N.0` by looking at the `rust-version`
18- # located in the root `Cargo.toml`.
19- msrv=$(grep 'rust-version.*1' Cargo.toml | sed 's/.*\. \([0-9 ]*\)\..* /\1/')
17+ # Determine MSRV by looking at the `rust-version` located in the root
18+ # `Cargo.toml`.
19+ msrv=$(grep 'rust-version.*1' Cargo.toml | sed 's/rust-version *\= *" \([^" ]*\)" /\1/')
2020
2121 if [ "${{ inputs.toolchain }}" = "msrv" ]; then
22- echo "version=1. $msrv.0 " >> "$GITHUB_OUTPUT"
22+ echo "version=$msrv" >> "$GITHUB_OUTPUT"
2323 else
2424 echo "version=${{ inputs.toolchain }}" >> "$GITHUB_OUTPUT"
2525 fi
Original file line number Diff line number Diff line change @@ -17,15 +17,17 @@ permissions:
1717jobs :
1818 build_and_test :
1919 name : Build and test
20- runs-on : ${{ matrix.os }}
20+ runs-on : ubuntu-latest
2121 strategy :
2222 matrix :
23- os : [ubuntu-latest, windows-latest, macOS-latest ]
23+ rust : [msrv, stable, nightly ]
2424
2525 steps :
2626 - uses : actions/checkout@master
2727
2828 - uses : ./.github/actions/install-rust
29+ with :
30+ toolchain : ${{ matrix.rust }}
2931
3032 - name : Install wasmtime
3133 uses : bytecodealliance/actions/wasmtime/setup@v1
Original file line number Diff line number Diff line change @@ -59,8 +59,7 @@ license = "Apache-2.0 WITH LLVM-exception"
5959repository = " https://github.com/bytecodealliance/wstd"
6060keywords = [" WebAssembly" , " async" , " stdlib" , " Components" ]
6161categories = [" wasm" , " asynchronous" ]
62- # Rust-version policy: stable N-2, same as wasmtime.
63- rust-version = " 1.89"
62+ rust-version = " 1.88"
6463authors = [
6564 " Yoshua Wuyts <rust@yosh.is>" ,
6665 " Pat Hickey <pat@moreproductive.org>" ,
Original file line number Diff line number Diff line change @@ -16,6 +16,9 @@ ureq.workspace = true
1616cargo_metadata.workspace = true
1717heck.workspace = true
1818
19+ [dependencies ]
20+ fs2 = " 0.4"
21+
1922[features ]
2023default = []
2124no-aws = []
Original file line number Diff line number Diff line change @@ -6,6 +6,9 @@ use std::process::{Child, Command};
66use std:: thread:: sleep;
77use std:: time:: Duration ;
88
9+ // Required until msrv over 1.89, at which point locking is available in std
10+ use fs2:: FileExt ;
11+
912const DEFAULT_SERVER_PORT : u16 = 8081 ;
1013
1114/// Manages exclusive access to port 8081, and kills the process when dropped
@@ -31,7 +34,8 @@ impl WasmtimeServe {
3134 let mut lockfile = std:: env:: temp_dir ( ) ;
3235 lockfile. push ( format ! ( "TEST_PROGRAMS_WASMTIME_SERVE_{port}.lock" ) ) ;
3336 let lockfile = File :: create ( & lockfile) ?;
34- lockfile. lock ( ) ?;
37+ // Once msrv reaches 1.89, replace with std's `.lock()` method
38+ lockfile. lock_exclusive ( ) ?;
3539
3640 // Run wasmtime serve.
3741 // Enable -Scli because we currently don't have a way to build with the
You can’t perform that action at this time.
0 commit comments