-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Nan
committed
Mar 17, 2024
1 parent
4a2ea39
commit a689743
Showing
2 changed files
with
119 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,129 @@ | ||
version: 2.1 | ||
|
||
orbs: | ||
win: circleci/windows@5.0 | ||
|
||
jobs: | ||
deterministic_x86_64: | ||
docker: | ||
- image: cimg/rust:1.75.0 | ||
linux_x86_64: | ||
machine: | ||
image: ubuntu-2004:current | ||
resource_class: medium | ||
steps: | ||
- checkout | ||
- run: cargo --version && cargo test --release && tar -czvf output_x86_64.tar.gz output | ||
- store_artifacts: | ||
path: ./output_x86_64.tar.gz | ||
|
||
deterministic_aarch64: | ||
docker: | ||
- image: cimg/rust:1.75.0 | ||
- checkout | ||
- run: | ||
name: Submodule | ||
command: git submodule sync & git submodule update --init | ||
- run: | ||
name: Setup environment | ||
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh && | ||
chmod +x rustup.sh && | ||
./rustup.sh -y --profile minimal --target wasm32-unknown-unknown && | ||
source "$HOME/.cargo/env" && | ||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
- run: | ||
name: Run linux x86_64 tests | ||
command: cargo --version && | ||
cargo test --release && | ||
tar -czvf linux_x86_64.tar.gz output | ||
# - run: | ||
# name: Run linux wasm tests | ||
# command: cargo --version && | ||
# node --version && | ||
# wasm-pack test --node --features "wasm nodejs" | ||
- store_artifacts: | ||
path: ./linux_x86_64.tar.gz | ||
|
||
linux_aarch64: | ||
machine: | ||
image: ubuntu-2004:current | ||
resource_class: arm.medium | ||
steps: | ||
- checkout | ||
- run: cargo --version && cargo test --release && tar -czvf output_aarch64.tar.gz output | ||
- store_artifacts: | ||
path: ./output_aarch64.tar.gz | ||
- checkout | ||
- run: | ||
name: Submodule | ||
command: git submodule sync & git submodule update --init | ||
- run: | ||
name: Setup environment | ||
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh && | ||
chmod +x rustup.sh && | ||
./rustup.sh -y --profile minimal --target wasm32-unknown-unknown && | ||
source "$HOME/.cargo/env" && | ||
curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh | ||
- run: | ||
name: Run linux aarch64 tests | ||
command: cargo --version && | ||
cargo test --release && | ||
tar -czvf linux_aarch64.tar.gz output | ||
# - run: | ||
# name: Run linux wasm tests | ||
# command: cargo --version && | ||
# node --version && | ||
# wasm-pack test --node --features "wasm nodejs" | ||
- store_artifacts: | ||
path: ./linux_aarch64.tar.gz | ||
|
||
windows_x86_64: | ||
machine: | ||
image: windows-server-2022-gui:current | ||
shell: powershell.exe -ExecutionPolicy Bypass | ||
resource_class: windows.medium | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup environment | ||
command: Invoke-WebRequest https://win.rustup.rs/x86_64 -OutFile rustup.exe; | ||
./rustup.exe default --profile minimal; | ||
./rustup.exe target add wasm32-unknown-unknown; | ||
npm install -g wasm-pack; | ||
rm C:\Users\circleci\project\rust-toolchain | ||
- run: | ||
name: Run windows x86_64 tests | ||
command: cargo --version; | ||
cargo test --release; | ||
tar -czvf windows_x86_64.tar.gz output | ||
- run: | ||
name: Run windows wasm tests | ||
command: cargo --version; | ||
node --version; | ||
wasm-pack test --node --features "wasm nodejs" | ||
- store_artifacts: | ||
path: ./windows_x86_64.tar.gz | ||
|
||
macos_aarch64: | ||
macos: | ||
xcode: 14.2.0 | ||
steps: | ||
- checkout | ||
- run: | ||
name: Setup environment | ||
command: curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs -o rustup.sh && | ||
chmod +x rustup.sh && | ||
./rustup.sh -y --profile minimal && | ||
source "$HOME/.cargo/env" | ||
- run: | ||
name: Run macos aarch64 tests | ||
command: cargo --version && | ||
cargo test --release && | ||
tar -czvf macos_aarch64.tar.gz output | ||
- store_artifacts: | ||
path: ./macos_aarch64.tar.gz | ||
|
||
workflows: | ||
deterministic: | ||
jobs: | ||
- deterministic_x86_64: | ||
filters: | ||
branches: | ||
only: [ "master", "test" ] | ||
- deterministic_aarch64: | ||
filters: | ||
branches: | ||
only: [ "master", "test" ] | ||
- linux_x86_64: | ||
filters: | ||
branches: | ||
only: [ "master", "test", "test-full", "test-linux-x64" ] | ||
- linux_aarch64: | ||
filters: | ||
branches: | ||
only: [ "master", "test", "test-full", "test-linux-arm64" ] | ||
# - windows_x86_64: | ||
# filters: | ||
# branches: | ||
# only: [ "master", "test", "test-full", "test-windows" ] | ||
# # - macos_aarch64: | ||
# filters: | ||
# branches: | ||
# only: [ "test-full", "test-macos" ] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters