Skip to content

Commit

Permalink
[CI] Update rust version & remove +nightly
Browse files Browse the repository at this point in the history
Signed-off-by: csh <[email protected]>
  • Loading branch information
L-jasmine committed Dec 2, 2024
1 parent 748af62 commit 2dcce56
Show file tree
Hide file tree
Showing 10 changed files with 81 additions and 119 deletions.
80 changes: 32 additions & 48 deletions .github/workflows/ci-build-release-lib.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
container:
image: wasmedge/wasmedge:ubuntu-build-clang

Expand All @@ -40,28 +40,24 @@ jobs:
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_crypto
ldconfig
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy check
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
cargo clippy -V
cargo clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Clippy check for async feature
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Build Async-Hello for Testing
working-directory: examples/wasmedge-sys
Expand All @@ -85,7 +81,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
container:
image: fedora:latest

Expand All @@ -103,28 +99,24 @@ jobs:
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_crypto
ldconfig
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy check
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
cargo clippy -V
cargo clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Clippy check for async feature
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Build Async-Hello for Testing
working-directory: examples/wasmedge-sys
Expand All @@ -149,7 +141,7 @@ jobs:
strategy:
matrix:
os: [macos-12, macos-13]
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]

steps:
- name: Checkout sources
Expand All @@ -161,23 +153,19 @@ jobs:
run: |
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- --plugins wasi_crypto
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Run cargo fmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,ffi -- -D warnings
- name: Test Rust Bindings
run: |
Expand All @@ -189,7 +177,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
env:
WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge
WASMEDGE_BUILD_DIR: ${{ github.workspace }}\WasmEdge\build
Expand Down Expand Up @@ -234,26 +222,22 @@ jobs:
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_SYSTEM_VERSION=$cmake_sys_version" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL "-DLLVM_DIR=$llvm_dir" -DWASMEDGE_BUILD_PACKAGE="ZIP" .
cmake --build build
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
run: |
$vsPath = (vswhere -latest -property installationPath)
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0"
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,ffi -- -D warnings
- name: Test Rust Bindings
run: |
Expand Down
80 changes: 32 additions & 48 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
strategy:
matrix:
os: [ubuntu-22.04, ubuntu-20.04]
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
container:
image: wasmedge/wasmedge:ubuntu-build-clang

Expand All @@ -53,28 +53,24 @@ jobs:
cmake --install build
ldconfig
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy check
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
cargo clippy -V
cargo clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Clippy check for async feature
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Build Async-Hello for Testing
working-directory: examples/wasmedge-sys
Expand All @@ -96,7 +92,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
container:
image: fedora:latest

Expand All @@ -121,28 +117,24 @@ jobs:
cmake --build build
cmake --install build
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy check
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
cargo clippy -V
cargo clippy --lib --examples --features aot,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Clippy check for async feature
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi -- -D warnings
- name: Build Async-Hello for Testing
working-directory: examples/wasmedge-sys
Expand Down Expand Up @@ -173,7 +165,7 @@ jobs:
strategy:
matrix:
os: [macos-12, macos-13]
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]

steps:
- name: Checkout sources
Expand Down Expand Up @@ -201,23 +193,19 @@ jobs:
cmake --build build
cmake --install build
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Run cargo fmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
run: |
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,ffi -- -D warnings
- name: Test Rust Bindings
run: |
Expand All @@ -228,7 +216,7 @@ jobs:
runs-on: windows-2022
strategy:
matrix:
rust: [1.78, 1.77, 1.76]
rust: [1.83, 1.82, 1.81]
env:
WASMEDGE_DIR: ${{ github.workspace }}\WasmEdge
WASMEDGE_BUILD_DIR: ${{ github.workspace }}\WasmEdge\build
Expand Down Expand Up @@ -271,26 +259,22 @@ jobs:
cmake -Bbuild -GNinja -DCMAKE_BUILD_TYPE=Release "-DCMAKE_SYSTEM_VERSION=$cmake_sys_version" -DCMAKE_MSVC_RUNTIME_LIBRARY=MultiThreadedDLL "-DLLVM_DIR=$llvm_dir" -DWASMEDGE_BUILD_PACKAGE="ZIP" .
cmake --build build
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
components: rustfmt, clippy
toolchain: ${{ matrix.rust }}

- name: Rustfmt
run: cargo +nightly fmt --all -- --check
run: cargo fmt --all -- --check

- name: Clippy
run: |
$vsPath = (vswhere -latest -property installationPath)
Import-Module (Join-Path $vsPath "Common7\Tools\Microsoft.VisualStudio.DevShell.dll")
Enter-VsDevShell -VsInstallPath $vsPath -SkipAutomaticLocation -DevCmdArguments "-arch=x64 -host_arch=x64 -winsdk=10.0.19041.0"
cargo +nightly clippy -V
cargo +nightly clippy --lib --examples --features aot,ffi -- -D warnings
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
cargo clippy -V
cargo clippy --lib --examples --features aot,ffi -- -D warnings
- name: Test Rust Bindings
run: |
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/publish-async-api-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,12 +36,12 @@ jobs:
curl -sSf https://raw.githubusercontent.com/WasmEdge/WasmEdge/master/utils/install.sh | bash -s -- -v ${{ inputs.wasmedge_version }} -p /usr/local
ldconfig
- name: Install Rust-nightly
uses: dtolnay/rust-toolchain@nightly
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable

- name: Build Async API document
run: |
RUSTDOCFLAGS="--cfg docsrs" cargo +nightly doc -p wasmedge-sdk --workspace --no-deps --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi --target-dir=./target
RUSTDOCFLAGS="--cfg docsrs" cargo doc -p wasmedge-sdk --workspace --no-deps --features aot,async,wasi_crypto,wasi_nn,wasmedge_process,ffi --target-dir=./target
- name: Deploy Async API document
if: github.ref == 'refs/heads/main'
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-async-wasi.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Install Rust v1.75
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.75

- name: Dry run cargo publish
env:
Expand Down
4 changes: 1 addition & 3 deletions .github/workflows/release-wasmedge-macro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@ jobs:
with:
fetch-depth: 0

- name: Install Rust v1.78
- name: Install Rust-stable
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.78

- name: Dry run cargo publish
env:
Expand Down
Loading

0 comments on commit 2dcce56

Please sign in to comment.