From 54c0dc233639c66e5166d683f01804c64c064b6e Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 12:15:12 +0200 Subject: [PATCH 1/7] Do not use containers in CI --- .github/workflows/ci.yml | 470 ++++++++++++++++++--------------------- 1 file changed, 214 insertions(+), 256 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 39976d929d9..d36c85f6c02 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -22,27 +22,22 @@ jobs: check-code-format: name: Check code format runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: Check format - run: | - rustup component add rustfmt - bash ./check.sh + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Check format + run: bash ./check.sh sbor-unit-tests: name: Run SBOR unit tests runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable - name: Run tests run: cargo test working-directory: sbor @@ -56,15 +51,11 @@ jobs: sbor-integration-tests: name: Run SBOR integration tests runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable - name: Run tests run: cargo test working-directory: sbor-tests @@ -78,87 +69,74 @@ jobs: scrypto-unit-tests: name: Run Scrypto unit tests runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - - name: Run tests - run: cargo test - working-directory: scrypto - - name: Run tests (no_std) - run: cargo test --no-default-features --features alloc - working-directory: scrypto - - name: Run abi tests - run: cargo test - working-directory: scrypto-schema - - name: Run derive tests - run: cargo test - working-directory: scrypto-derive + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test + working-directory: scrypto + - name: Run tests (no_std) + run: cargo test --no-default-features --features alloc + working-directory: scrypto + - name: Run abi tests + run: cargo test + working-directory: scrypto-schema + - name: Run derive tests + run: cargo test + working-directory: scrypto-derive scrypto-integration-tests: name: Run Scrypto integration tests runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - - name: Run tests - run: cargo test - working-directory: scrypto-derive-tests - - name: Run tests with no_std - run: cargo test --no-default-features --features alloc - working-directory: scrypto-derive-tests + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test + working-directory: scrypto-derive-tests + - name: Run tests with no_std + run: cargo test --no-default-features --features alloc + working-directory: scrypto-derive-tests scrypto-examples: name: Run Scrypto examples runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - rustup target add wasm32-unknown-unknown - - name: Build faucet - run: cargo build --target wasm32-unknown-unknown --release - working-directory: assets/blueprints/faucet - - name: Build radiswap - run: cargo build --target wasm32-unknown-unknown --release - working-directory: assets/blueprints/radiswap - - name: Build no-std - run: cargo build --target wasm32-unknown-unknown --release - working-directory: examples/no-std - - name: Build and test hello-world - run: cargo build --target wasm32-unknown-unknown --release && cargo test --release - working-directory: examples/hello-world - - name: Build and test everything - run: cargo build --target wasm32-unknown-unknown --release && cargo test --release - working-directory: examples/everything + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Build faucet + run: cargo build --target wasm32-unknown-unknown --release + working-directory: assets/blueprints/faucet + - name: Build radiswap + run: cargo build --target wasm32-unknown-unknown --release + working-directory: assets/blueprints/radiswap + - name: Build no-std + run: cargo build --target wasm32-unknown-unknown --release + working-directory: examples/no-std + - name: Build and test hello-world + run: cargo build --target wasm32-unknown-unknown --release && cargo test --release + working-directory: examples/hello-world + - name: Build and test everything + run: cargo build --target wasm32-unknown-unknown --release && cargo test --release + working-directory: examples/everything scrypto-stubs: name: Check Scrypto Stubs runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools rustfmt - - run: ./check_stubs.sh + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - run: ./check_stubs.sh radix-engine-build: name: Run Radix Engine build (RocksDB) @@ -188,10 +166,9 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + target: wasm32-unknown-unknown - name: Install nextest uses: taiki-e/install-action@nextest - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - name: Run tests run: | cargo nextest run \ @@ -211,131 +188,114 @@ jobs: name: Run Radix Engine tests (release) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - name: Run tests - run: | - cargo nextest run \ - --release \ - -p radix-engine-common \ - -p radix-engine-derive \ - -p radix-engine-interface \ - -p radix-engine \ - -p radix-engine-tests + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Install nextest + uses: taiki-e/install-action@nextest + - name: Run tests + run: | + cargo nextest run \ + --release \ + -p radix-engine-common \ + -p radix-engine-derive \ + -p radix-engine-interface \ + -p radix-engine \ + -p radix-engine-tests radix-engine-no-std: name: Run Radix Engine tests (no_std) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - name: Run tests - run: | - cargo nextest run \ - --no-default-features --features alloc \ - -p radix-engine-common \ - -p radix-engine-derive \ - -p radix-engine-interface \ - -p radix-engine \ - -p radix-engine-tests + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Install nextest + uses: taiki-e/install-action@nextest + - name: Run tests + run: | + cargo nextest run \ + --no-default-features --features alloc \ + -p radix-engine-common \ + -p radix-engine-derive \ + -p radix-engine-interface \ + -p radix-engine \ + -p radix-engine-tests radix-engine-wasmer: name: Run Radix Engine tests (wasmer) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - name: Run tests - run: | - cargo nextest run \ - --features wasmer \ - -p radix-engine-common \ - -p radix-engine-derive \ - -p radix-engine-interface \ - -p radix-engine \ - -p radix-engine-tests + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Install nextest + uses: taiki-e/install-action@nextest + - name: Run tests + run: | + cargo nextest run \ + --features wasmer \ + -p radix-engine-common \ + -p radix-engine-derive \ + -p radix-engine-interface \ + -p radix-engine \ + -p radix-engine-tests radix-engine-bench: name: Run Radix Engine benchmarks runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - rustup target add wasm32-unknown-unknown - - name: Run bench - run: cargo bench - working-directory: radix-engine-tests + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Run bench + run: cargo bench + working-directory: radix-engine-tests radix-engine-common-bench: name: Run Radix Engine common benchmarks runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - rustup target add wasm32-unknown-unknown - - name: Run bench - run: cargo bench - working-directory: radix-engine-common + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - name: Run bench + run: cargo bench + working-directory: radix-engine-common transaction: name: Run transaction tests runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - - name: Run tests - run: cargo test - working-directory: transaction + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test + working-directory: transaction transaction-scenarios: name: Run transaction scenarios runs-on: ubuntu-latest - container: - image: rust:bullseye steps: - - uses: actions/checkout@v3 - - name: setup the container - run: | - apt update && apt install -y clang llvm cmake build-essential - rustup component add llvm-tools - curl -LsSf https://get.nexte.st/latest/linux | tar zxf - -C ${CARGO_HOME:-~/.cargo}/bin - - name: Run tests - run: cargo test - working-directory: transaction-scenarios + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Run tests + run: cargo test + working-directory: transaction-scenarios cli-resim-rtmc-rtmd: name: Run CLI tests (resim & rtmc & rtmd) @@ -344,33 +304,32 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: radixdlt/rust-cache@allow_registry_src_caching - with: - prefix-key: "" - shared-key: simulator-debug-${{ runner.os }} - cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* - workspaces: simulator - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 - if: runner.os == 'Windows' - run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - name: Install dependencies - if: runner.os == 'Windows' - run: choco install llvm -y - - name: Run Unit tests - run: cargo test - working-directory: simulator - - name: Run tests - run: bash ./tests/resim.sh - working-directory: simulator - - name: Run tests - run: bash ./tests/manifest.sh - working-directory: simulator + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - uses: radixdlt/rust-cache@allow_registry_src_caching + with: + prefix-key: "" + shared-key: simulator-debug-${{ runner.os }} + cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* + workspaces: simulator + - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 + if: runner.os == 'Windows' + run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + - name: Install dependencies + if: runner.os == 'Windows' + run: choco install llvm -y + - name: Run Unit tests + run: cargo test + working-directory: simulator + - name: Run tests + run: bash ./tests/resim.sh + working-directory: simulator + - name: Run tests + run: bash ./tests/manifest.sh + working-directory: simulator cli-scrypto: name: Run CLI tests (scrypto) @@ -379,27 +338,26 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores, macos-latest] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - uses: radixdlt/rust-cache@allow_registry_src_caching - with: - prefix-key: "" - shared-key: simulator-debug-${{ runner.os }} - cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* - workspaces: simulator - - name: Add wasm target - run: rustup target add wasm32-unknown-unknown - - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 - if: runner.os == 'Windows' - run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - name: Install dependencies - if: runner.os == 'Windows' - run: choco install llvm -y - - name: Run tests - run: bash ./tests/scrypto.sh - working-directory: simulator + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + - uses: radixdlt/rust-cache@allow_registry_src_caching + with: + prefix-key: "" + shared-key: simulator-debug-${{ runner.os }} + cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* + workspaces: simulator + - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 + if: runner.os == 'Windows' + run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + - name: Install dependencies + if: runner.os == 'Windows' + run: choco install llvm -y + - name: Run tests + run: bash ./tests/scrypto.sh + working-directory: simulator cargo-check: name: Run cargo check @@ -408,12 +366,12 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Cargo Check - run: cargo check --all + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Cargo Check + run: cargo check --all cargo-check-post-run-db-check: name: Run cargo check @@ -422,27 +380,27 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Cargo Check - run: cargo check --all --features post_run_db_check + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Cargo Check + run: cargo check --all --features post_run_db_check determinism-test: name: Run determinism test runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Pull LFS assets - run: git lfs pull - - name: Replay transactions - run: | - cargo run --release --bin replay -- \ - execute-in-memory ../assets-lfs/babylon-mainnet-transactions-2023-10-11.tar.gz \ - --max-version 50000 \ - --breakpoints 10:91850a10dad5ec6d9a974663e87243b3f3ff8f8b1c0dd74135e8ddd097aa6276,100:8ac9b0caf4daad6f821038f325b215932e90fbabce089ca42bc0330c867aa8f8,1000:6b621e9c7f9674c3d71832aec822b695b0e90010dc6158a18e43fbacf296ef69,500000:7dd4403a757f43f4a885e914b8dc38086fdbaf96082fa90067acf1500075e85d - working-directory: simulator + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + - name: Pull LFS assets + run: git lfs pull + - name: Replay transactions + run: | + cargo run --release --bin replay -- \ + execute-in-memory ../assets-lfs/babylon-mainnet-transactions-2023-10-11.tar.gz \ + --max-version 50000 \ + --breakpoints 10:91850a10dad5ec6d9a974663e87243b3f3ff8f8b1c0dd74135e8ddd097aa6276,100:8ac9b0caf4daad6f821038f325b215932e90fbabce089ca42bc0330c867aa8f8,1000:6b621e9c7f9674c3d71832aec822b695b0e90010dc6158a18e43fbacf296ef69,500000:7dd4403a757f43f4a885e914b8dc38086fdbaf96082fa90067acf1500075e85d + working-directory: simulator From 983af7b93e55e5a9bd23bd55fe062b149d667ce1 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 12:16:13 +0200 Subject: [PATCH 2/7] Implement composite GH action 'setup-job' --- .github/actions/setup-job/action.yml | 35 ++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/actions/setup-job/action.yml diff --git a/.github/actions/setup-job/action.yml b/.github/actions/setup-job/action.yml new file mode 100644 index 00000000000..f7d5e6a48b1 --- /dev/null +++ b/.github/actions/setup-job/action.yml @@ -0,0 +1,35 @@ +name: 'Setup workflow job' +description: 'Configures the job to perform radixdlt-scrypto CI' +inputs: + varFilePath: + description: 'File path to variable file or directory. Defaults to ./.github/variables/* if none specified and runs against each file in that directory.' + required: false + default: ./.github/variables/* +runs: + using: "composite" + steps: + - uses: actions/checkout@v3 + + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + target: wasm32-unknown-unknown + components: llvm-tools, rustfmt + + - name: Install nextest + uses: taiki-e/install-action@nextest + + - uses: radixdlt/rust-cache@allow_registry_src_caching + with: + prefix-key: "" + shared-key: simulator-debug-${{ runner.os }} + cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* + workspaces: simulator + + - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 + if: runner.os == 'Windows' + run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + - name: Install dependencies + if: runner.os == 'Windows' + run: choco install llvm -y + From 47a4ad86bff4f61536b21ff8f2f37e975f469c38 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 14:27:54 +0200 Subject: [PATCH 3/7] Use 'cargo nextest' where possible in CI --- .github/workflows/ci.yml | 68 ++++++++++++++++++++++------------------ 1 file changed, 37 insertions(+), 31 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index d36c85f6c02..1836f10b0dd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -38,15 +38,14 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: sbor + run: cargo nextest run -p sbor - name: Run tests (no_std) - run: cargo test --no-default-features --features alloc - working-directory: sbor + run: cargo nextest run -p sbor --no-default-features --features alloc - name: Run derive tests - run: cargo test - working-directory: sbor-derive-common + run: cargo nextest run -p sbor-derive-common sbor-integration-tests: name: Run SBOR integration tests @@ -56,15 +55,14 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: sbor-tests + run: cargo nextest run -p sbor-tests - name: Run tests (no_std) - run: cargo test --no-default-features --features alloc - working-directory: sbor-tests + run: cargo nextest run -p sbor-tests --no-default-features --features alloc - name: Run bench - run: cargo bench - working-directory: sbor-tests + run: cargo bench -p sbor-tests scrypto-unit-tests: name: Run Scrypto unit tests @@ -74,18 +72,16 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: scrypto + run: cargo nextest run -p scrypto - name: Run tests (no_std) - run: cargo test --no-default-features --features alloc - working-directory: scrypto + run: cargo nextest run -p scrypto --no-default-features --features alloc - name: Run abi tests - run: cargo test - working-directory: scrypto-schema + run: cargo nextest run -p scrypto-schema - name: Run derive tests - run: cargo test - working-directory: scrypto-derive + run: cargo nextest run -p scrypto-derive scrypto-integration-tests: name: Run Scrypto integration tests @@ -95,12 +91,12 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: scrypto-derive-tests + run: cargo nextest run -p scrypto-derive-tests - name: Run tests with no_std - run: cargo test --no-default-features --features alloc - working-directory: scrypto-derive-tests + run: cargo nextest run -p scrypto-derive-tests --no-default-features --features alloc scrypto-examples: name: Run Scrypto examples @@ -111,6 +107,8 @@ jobs: with: toolchain: stable target: wasm32-unknown-unknown + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Build faucet run: cargo build --target wasm32-unknown-unknown --release working-directory: assets/blueprints/faucet @@ -121,10 +119,14 @@ jobs: run: cargo build --target wasm32-unknown-unknown --release working-directory: examples/no-std - name: Build and test hello-world - run: cargo build --target wasm32-unknown-unknown --release && cargo test --release + run: | + cargo build --target wasm32-unknown-unknown --release + cargo nextest run --release working-directory: examples/hello-world - name: Build and test everything - run: cargo build --target wasm32-unknown-unknown --release && cargo test --release + run: | + cargo build --target wasm32-unknown-unknown --release + cargo nextest run --release working-directory: examples/everything scrypto-stubs: @@ -281,9 +283,10 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: transaction + run: cargo nextest run -p transaction transaction-scenarios: name: Run transaction scenarios @@ -293,9 +296,10 @@ jobs: - uses: actions-rs/toolchain@v1 with: toolchain: stable + - name: Install nextest + uses: taiki-e/install-action@nextest - name: Run tests - run: cargo test - working-directory: transaction-scenarios + run: cargo nextest run -p transaction-scenarios cli-resim-rtmc-rtmd: name: Run CLI tests (resim & rtmc & rtmd) @@ -309,6 +313,8 @@ jobs: with: toolchain: stable target: wasm32-unknown-unknown + - name: Install nextest + uses: taiki-e/install-action@nextest - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" @@ -322,7 +328,7 @@ jobs: if: runner.os == 'Windows' run: choco install llvm -y - name: Run Unit tests - run: cargo test + run: cargo nextest run working-directory: simulator - name: Run tests run: bash ./tests/resim.sh From 79108aa932a9491197c208d0195470ef3b200fd3 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 15:06:29 +0200 Subject: [PATCH 4/7] Use common GH action to setup job --- .github/workflows/ci.yml | 191 +++++++++++---------------------------- 1 file changed, 52 insertions(+), 139 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1836f10b0dd..af542638795 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,10 +23,8 @@ jobs: name: Check code format runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - name: Setup job + uses: ./.github/actions/setup-job - name: Check format run: bash ./check.sh @@ -34,12 +32,8 @@ jobs: name: Run SBOR unit tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p sbor - name: Run tests (no_std) @@ -51,12 +45,8 @@ jobs: name: Run SBOR integration tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p sbor-tests - name: Run tests (no_std) @@ -68,12 +58,8 @@ jobs: name: Run Scrypto unit tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p scrypto - name: Run tests (no_std) @@ -87,12 +73,8 @@ jobs: name: Run Scrypto integration tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p scrypto-derive-tests - name: Run tests with no_std @@ -102,13 +84,8 @@ jobs: name: Run Scrypto examples runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Build faucet run: cargo build --target wasm32-unknown-unknown --release working-directory: assets/blueprints/faucet @@ -133,12 +110,10 @@ jobs: name: Check Scrypto Stubs runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - run: ./check_stubs.sh + - name: Setup job + uses: ./.github/actions/setup-job + - name: Check stubs + run: ./check_stubs.sh radix-engine-build: name: Run Radix Engine build (RocksDB) @@ -147,30 +122,23 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install dependency - run: sudo apt-get -y update && sudo apt-get -y install pkg-config libfreetype6-dev libfontconfig1-dev - - name: Build with resource tracking - run: cargo build --features resource_tracker - - name: Build with rocksdb - run: cargo test -p radix-engine-profiling -p radix-engine-stores --features rocksdb --release --no-run -- --nocapture - - name: Build bench with rocksdb - run: cargo bench --features rocksdb --no-run + - name: Setup job + uses: ./.github/actions/setup-job + - name: Install dependency + run: sudo apt-get -y update && sudo apt-get -y install pkg-config libfreetype6-dev libfontconfig1-dev + - name: Build with resource tracking + run: cargo build --features resource_tracker + - name: Build with rocksdb + run: cargo test -p radix-engine-profiling -p radix-engine-stores --features rocksdb --release --no-run -- --nocapture + - name: Build bench with rocksdb + run: cargo bench --features rocksdb --no-run radix-engine: name: Run Radix Engine tests runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -190,13 +158,8 @@ jobs: name: Run Radix Engine tests (release) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -211,13 +174,8 @@ jobs: name: Run Radix Engine tests (no_std) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -232,13 +190,8 @@ jobs: name: Run Radix Engine tests (wasmer) runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -253,11 +206,8 @@ jobs: name: Run Radix Engine benchmarks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown + - name: Setup job + uses: ./.github/actions/setup-job - name: Run bench run: cargo bench working-directory: radix-engine-tests @@ -266,11 +216,8 @@ jobs: name: Run Radix Engine common benchmarks runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown + - name: Setup job + uses: ./.github/actions/setup-job - name: Run bench run: cargo bench working-directory: radix-engine-common @@ -279,12 +226,8 @@ jobs: name: Run transaction tests runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p transaction @@ -292,12 +235,8 @@ jobs: name: Run transaction scenarios runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p transaction-scenarios @@ -308,25 +247,14 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown - - name: Install nextest - uses: taiki-e/install-action@nextest + - name: Setup job + uses: ./.github/actions/setup-job - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" shared-key: simulator-debug-${{ runner.os }} cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* workspaces: simulator - - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 - if: runner.os == 'Windows' - run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - name: Install dependencies - if: runner.os == 'Windows' - run: choco install llvm -y - name: Run Unit tests run: cargo nextest run working-directory: simulator @@ -344,23 +272,14 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores, macos-latest] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - target: wasm32-unknown-unknown + - name: Setup job + uses: ./.github/actions/setup-job - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" shared-key: simulator-debug-${{ runner.os }} cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* workspaces: simulator - - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 - if: runner.os == 'Windows' - run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV - - name: Install dependencies - if: runner.os == 'Windows' - run: choco install llvm -y - name: Run tests run: bash ./tests/scrypto.sh working-directory: simulator @@ -372,10 +291,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - name: Setup job + uses: ./.github/actions/setup-job - name: Cargo Check run: cargo check --all @@ -386,10 +303,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - name: Setup job + uses: ./.github/actions/setup-job - name: Cargo Check run: cargo check --all --features post_run_db_check @@ -397,10 +312,8 @@ jobs: name: Run determinism test runs-on: ubuntu-latest-16-cores steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - name: Setup job + uses: ./.github/actions/setup-job - name: Pull LFS assets run: git lfs pull - name: Replay transactions From 3021819c906e95e76af447b92ef209f4334be751 Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 15:11:54 +0200 Subject: [PATCH 5/7] Fix 'setup-job' action --- .github/actions/setup-job/action.yml | 18 +----- .github/workflows/ci.yml | 84 ++++++++++++++-------------- 2 files changed, 45 insertions(+), 57 deletions(-) diff --git a/.github/actions/setup-job/action.yml b/.github/actions/setup-job/action.yml index f7d5e6a48b1..2acfe307bb8 100644 --- a/.github/actions/setup-job/action.yml +++ b/.github/actions/setup-job/action.yml @@ -1,35 +1,23 @@ name: 'Setup workflow job' description: 'Configures the job to perform radixdlt-scrypto CI' -inputs: - varFilePath: - description: 'File path to variable file or directory. Defaults to ./.github/variables/* if none specified and runs against each file in that directory.' - required: false - default: ./.github/variables/* + runs: using: "composite" steps: - - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 with: toolchain: stable target: wasm32-unknown-unknown - components: llvm-tools, rustfmt - name: Install nextest uses: taiki-e/install-action@nextest - - uses: radixdlt/rust-cache@allow_registry_src_caching - with: - prefix-key: "" - shared-key: simulator-debug-${{ runner.os }} - cache-directories: ~/.cargo/registry/src/**/librocksdb-sys-* - workspaces: simulator - - name: Set LIBCLANG_PATH # See https://github.com/rust-lang/rust-bindgen/issues/1797 if: runner.os == 'Windows' run: echo "LIBCLANG_PATH=$((gcm clang).source -replace "clang.exe")" >> $env:GITHUB_ENV + shell: bash - name: Install dependencies if: runner.os == 'Windows' run: choco install llvm -y + shell: bash diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index af542638795..47d267461ff 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -23,8 +23,8 @@ jobs: name: Check code format runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Check format run: bash ./check.sh @@ -32,8 +32,8 @@ jobs: name: Run SBOR unit tests runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p sbor - name: Run tests (no_std) @@ -45,8 +45,8 @@ jobs: name: Run SBOR integration tests runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p sbor-tests - name: Run tests (no_std) @@ -58,8 +58,8 @@ jobs: name: Run Scrypto unit tests runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p scrypto - name: Run tests (no_std) @@ -73,8 +73,8 @@ jobs: name: Run Scrypto integration tests runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p scrypto-derive-tests - name: Run tests with no_std @@ -84,8 +84,8 @@ jobs: name: Run Scrypto examples runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Build faucet run: cargo build --target wasm32-unknown-unknown --release working-directory: assets/blueprints/faucet @@ -110,8 +110,8 @@ jobs: name: Check Scrypto Stubs runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Check stubs run: ./check_stubs.sh @@ -122,8 +122,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Install dependency run: sudo apt-get -y update && sudo apt-get -y install pkg-config libfreetype6-dev libfontconfig1-dev - name: Build with resource tracking @@ -137,8 +137,8 @@ jobs: name: Run Radix Engine tests runs-on: ubuntu-latest-16-cores steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -158,8 +158,8 @@ jobs: name: Run Radix Engine tests (release) runs-on: ubuntu-latest-16-cores steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -174,8 +174,8 @@ jobs: name: Run Radix Engine tests (no_std) runs-on: ubuntu-latest-16-cores steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -190,8 +190,8 @@ jobs: name: Run Radix Engine tests (wasmer) runs-on: ubuntu-latest-16-cores steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: | cargo nextest run \ @@ -206,8 +206,8 @@ jobs: name: Run Radix Engine benchmarks runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run bench run: cargo bench working-directory: radix-engine-tests @@ -216,8 +216,8 @@ jobs: name: Run Radix Engine common benchmarks runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run bench run: cargo bench working-directory: radix-engine-common @@ -226,8 +226,8 @@ jobs: name: Run transaction tests runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p transaction @@ -235,8 +235,8 @@ jobs: name: Run transaction scenarios runs-on: ubuntu-latest steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Run tests run: cargo nextest run -p transaction-scenarios @@ -247,8 +247,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores] steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" @@ -272,8 +272,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores, windows-latest-16-cores, macos-latest] steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" @@ -291,8 +291,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Cargo Check run: cargo check --all @@ -303,8 +303,8 @@ jobs: matrix: os: [ubuntu-latest-16-cores] steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Cargo Check run: cargo check --all --features post_run_db_check @@ -312,8 +312,8 @@ jobs: name: Run determinism test runs-on: ubuntu-latest-16-cores steps: - - name: Setup job - uses: ./.github/actions/setup-job + - uses: actions/checkout@v3 + - uses: ./.github/actions/setup-job - name: Pull LFS assets run: git lfs pull - name: Replay transactions From 2f31d5459a340c207371e9555b4775a523c22acc Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 15:52:01 +0200 Subject: [PATCH 6/7] Rename 'setup-job' action to 'setup-env' --- .../{setup-job => setup-env}/action.yml | 8 ++- .github/workflows/ci.yml | 63 ++++++++++++------- 2 files changed, 47 insertions(+), 24 deletions(-) rename .github/actions/{setup-job => setup-env}/action.yml (75%) diff --git a/.github/actions/setup-job/action.yml b/.github/actions/setup-env/action.yml similarity index 75% rename from .github/actions/setup-job/action.yml rename to .github/actions/setup-env/action.yml index 2acfe307bb8..9ebc8d2fb4c 100644 --- a/.github/actions/setup-job/action.yml +++ b/.github/actions/setup-env/action.yml @@ -1,12 +1,14 @@ -name: 'Setup workflow job' -description: 'Configures the job to perform radixdlt-scrypto CI' +name: 'Setup environment' +description: 'Common GH action to setup job environment' runs: using: "composite" steps: - - uses: actions-rs/toolchain@v1 + - name: Install Rust toolchain + uses: actions-rs/toolchain@v1 with: toolchain: stable + default: true target: wasm32-unknown-unknown - name: Install nextest diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 47d267461ff..38ab11d1aba 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,7 +24,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Check format run: bash ./check.sh @@ -33,7 +34,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p sbor - name: Run tests (no_std) @@ -46,7 +48,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p sbor-tests - name: Run tests (no_std) @@ -59,7 +62,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p scrypto - name: Run tests (no_std) @@ -74,7 +78,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p scrypto-derive-tests - name: Run tests with no_std @@ -85,7 +90,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Build faucet run: cargo build --target wasm32-unknown-unknown --release working-directory: assets/blueprints/faucet @@ -111,7 +117,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Check stubs run: ./check_stubs.sh @@ -123,7 +130,8 @@ jobs: os: [ubuntu-latest-16-cores] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Install dependency run: sudo apt-get -y update && sudo apt-get -y install pkg-config libfreetype6-dev libfontconfig1-dev - name: Build with resource tracking @@ -138,7 +146,8 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: | cargo nextest run \ @@ -159,7 +168,8 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: | cargo nextest run \ @@ -175,7 +185,8 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: | cargo nextest run \ @@ -191,7 +202,8 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: | cargo nextest run \ @@ -207,7 +219,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run bench run: cargo bench working-directory: radix-engine-tests @@ -217,7 +230,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run bench run: cargo bench working-directory: radix-engine-common @@ -227,7 +241,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p transaction @@ -236,7 +251,8 @@ jobs: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Run tests run: cargo nextest run -p transaction-scenarios @@ -248,7 +264,8 @@ jobs: os: [ubuntu-latest-16-cores, windows-latest-16-cores] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" @@ -273,7 +290,8 @@ jobs: os: [ubuntu-latest-16-cores, windows-latest-16-cores, macos-latest] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - uses: radixdlt/rust-cache@allow_registry_src_caching with: prefix-key: "" @@ -292,7 +310,8 @@ jobs: os: [ubuntu-latest-16-cores] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Cargo Check run: cargo check --all @@ -304,7 +323,8 @@ jobs: os: [ubuntu-latest-16-cores] steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Cargo Check run: cargo check --all --features post_run_db_check @@ -313,7 +333,8 @@ jobs: runs-on: ubuntu-latest-16-cores steps: - uses: actions/checkout@v3 - - uses: ./.github/actions/setup-job + - name: Setup environment + uses: ./.github/actions/setup-env - name: Pull LFS assets run: git lfs pull - name: Replay transactions From 7ebc80c16fe09f472b92b12075005903d42435fc Mon Sep 17 00:00:00 2001 From: Lukasz Rubaszewski Date: Tue, 17 Oct 2023 16:47:28 +0200 Subject: [PATCH 7/7] Use common 'setup-env' GH action for CPU instructions workflow --- .github/workflows/cpu_instructions.yml | 26 ++++++++------------------ 1 file changed, 8 insertions(+), 18 deletions(-) diff --git a/.github/workflows/cpu_instructions.yml b/.github/workflows/cpu_instructions.yml index fc3701ff687..66f581a86b9 100644 --- a/.github/workflows/cpu_instructions.yml +++ b/.github/workflows/cpu_instructions.yml @@ -13,11 +13,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Setup dependencies - run: rustup target add wasm32-unknown-unknown + - name: Setup environment + uses: ./.github/actions/setup-env - name: Build radix-engine-tests run: | cd radix-engine-tests @@ -53,11 +50,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Setup dependencies - run: rustup target add wasm32-unknown-unknown + - name: Setup environment + uses: ./.github/actions/setup-env - name: Build tests run: | cargo test --release --no-run --features resource_tracker --workspace --exclude radix-engine-tests @@ -91,9 +85,8 @@ jobs: runs-on: ubuntu-22.04 steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable + - name: Setup environment + uses: ./.github/actions/setup-env - name: Setup dependencies run: | sudo apt-get update @@ -132,11 +125,8 @@ jobs: bin-cache: [1, 2, 3, 4] steps: - uses: actions/checkout@v3 - - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - - name: Setup dependencies - run: rustup target add wasm32-unknown-unknown + - name: Setup environment + uses: ./.github/actions/setup-env - name: Read cache QEMU binary uses: actions/cache/restore@v3 with: