From 1c5f70e61a53c02ffacd5cd07bd724e0351c6de5 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Thu, 3 Aug 2023 23:18:17 +0300 Subject: [PATCH 01/16] Trigger CI --- Cargo.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Cargo.toml b/Cargo.toml index e8d5124bc2..73f26dace5 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -41,7 +41,7 @@ members = [ "script-storage", "spell-storage", "particle-execution", - "crates/system-services" + "crates/system-services", ] exclude = [ "nox/tests/tetraplets", From fc6c89f9ab9f0adb2376f479d627a0141bc00e4d Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 08:28:19 +0300 Subject: [PATCH 02/16] Use cache in tests --- .github/workflows/rustdoc.yml | 11 +++++++++++ .github/workflows/tests.yml | 11 +++++++++++ 2 files changed, 22 insertions(+) diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index b5b0607846..266b7193db 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -10,6 +10,7 @@ env: CARGO_NET_RETRY: 2 RUSTFLAGS: "--cfg tokio_unstable" RUSTUP_MAX_RETRIES: 10 + RUSTC_WRAPPER: "sccache" jobs: rustdoc: @@ -25,6 +26,16 @@ jobs: - name: Setup Rust toolchain uses: dsherret/rust-toolchain-file@v1 + - name: Setup cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: ~/.cache/sccache + shared-key: build + save-if: false + + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 + - name: Build documentation env: RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index dfadba3dd2..5612e1e9b4 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,6 +14,7 @@ on: env: RUSTFLAGS: "-D warnings --cfg tokio_unstable" + RUSTC_WRAPPER: "sccache" jobs: tests: @@ -31,6 +32,16 @@ jobs: - name: Setup Rust toolchain uses: dsherret/rust-toolchain-file@v1 + - name: Setup cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: ~/.cache/sccache + shared-key: build + save-if: false + + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup nextest uses: taiki-e/install-action@nextest From 3db9e65bec964ee6b198d79d20a1e463f057809d Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 08:38:16 +0300 Subject: [PATCH 03/16] Fix --- .github/workflows/rustdoc.yml | 10 ---------- .github/workflows/tests.yml | 7 ++++++- 2 files changed, 6 insertions(+), 11 deletions(-) diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index 266b7193db..5db9c267d1 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -26,16 +26,6 @@ jobs: - name: Setup Rust toolchain uses: dsherret/rust-toolchain-file@v1 - - name: Setup cache - uses: Swatinem/rust-cache@v2 - with: - cache-directories: ~/.cache/sccache - shared-key: build - save-if: false - - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.3 - - name: Build documentation env: RUSTDOCFLAGS: "--enable-index-page -Zunstable-options" diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 5612e1e9b4..a0cb476b8d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -13,7 +13,7 @@ on: default: "null" env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable" + RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" RUSTC_WRAPPER: "sccache" jobs: @@ -42,6 +42,11 @@ jobs: - name: Setup sccache uses: mozilla-actions/sccache-action@v0.0.3 + - name: Setup mold linker + uses: rui314/setup-mold@v1 + with: + make-default: false + - name: Setup nextest uses: taiki-e/install-action@nextest From 0dc18e9fea09779754e80e89445ade7e556cc4c1 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 09:23:33 +0300 Subject: [PATCH 04/16] Run clippy then tests --- .github/workflows/tests.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index a0cb476b8d..9bfcf6e2b8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,6 +56,13 @@ jobs: with: dependencies: ${{ inputs.cargo-dependencies }} + - name: Run cargo clippy + uses: giraffate/clippy-action@v1 + with: + reporter: github-pr-review + clippy_flags: -Z unstable-options --all + fail_on_error: true + - name: Run cargo nextest run: cargo nextest run --release --all-features --profile ci @@ -69,10 +76,3 @@ jobs: - name: Run cargo fmt run: cargo fmt --all -- --check - - - name: Run cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: github-pr-review - clippy_flags: -Z unstable-options --all - fail_on_error: true From 7e1a0bc915588823b9a28396ff62185e2c1c2833 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 09:27:54 +0300 Subject: [PATCH 05/16] Move clippy and fmt in lint workflow --- .github/workflows/lint.yml | 39 +++++++++++++++++++++++++++++++++++++ .github/workflows/tests.yml | 10 ---------- 2 files changed, 39 insertions(+), 10 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index b3374a5273..efc9318d88 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -33,3 +33,42 @@ jobs: with: reporter: github-pr-check fail_on_error: true + + cargo: + runs-on: ubuntu-latest + + env: + RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" + RUSTC_WRAPPER: "sccache" + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Rust toolchain + uses: dsherret/rust-toolchain-file@v1 + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: ~/.cache/sccache + shared-key: build + save-if: false + + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 + + - name: Setup mold linker + uses: rui314/setup-mold@v1 + with: + make-default: false + + - name: Run cargo clippy + uses: giraffate/clippy-action@v1 + with: + reporter: github-pr-review + clippy_flags: -Z unstable-options --all + fail_on_error: true + + - name: Run cargo fmt + run: cargo fmt --all -- --check diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 9bfcf6e2b8..e7067803a8 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -56,13 +56,6 @@ jobs: with: dependencies: ${{ inputs.cargo-dependencies }} - - name: Run cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: github-pr-review - clippy_flags: -Z unstable-options --all - fail_on_error: true - - name: Run cargo nextest run: cargo nextest run --release --all-features --profile ci @@ -73,6 +66,3 @@ jobs: name: nox report path: target/nextest/ci/junit.xml reporter: java-junit - - - name: Run cargo fmt - run: cargo fmt --all -- --check From 3a9711976a850ca4fc869cc6a8bc02a62666e3d9 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 09:38:39 +0300 Subject: [PATCH 06/16] Cleanup --- .github/workflows/build.yml | 1 + .github/workflows/lint.yml | 22 ---------------------- .github/workflows/rustdoc.yml | 1 - .github/workflows/tests.yml | 9 ++++++++- 4 files changed, 9 insertions(+), 24 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 3f84e563e7..eda6ef2e75 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -77,6 +77,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-directories: ~/.cache/sccache + shared-key: nox # github allows only 10GB of cache # so save cache only on merge to master # to use less space and speed up CI diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index efc9318d88..ab21cc979b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -48,27 +48,5 @@ jobs: - name: Setup Rust toolchain uses: dsherret/rust-toolchain-file@v1 - - name: Setup cache - uses: Swatinem/rust-cache@v2 - with: - cache-directories: ~/.cache/sccache - shared-key: build - save-if: false - - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Setup mold linker - uses: rui314/setup-mold@v1 - with: - make-default: false - - - name: Run cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: github-pr-review - clippy_flags: -Z unstable-options --all - fail_on_error: true - - name: Run cargo fmt run: cargo fmt --all -- --check diff --git a/.github/workflows/rustdoc.yml b/.github/workflows/rustdoc.yml index 5db9c267d1..b5b0607846 100644 --- a/.github/workflows/rustdoc.yml +++ b/.github/workflows/rustdoc.yml @@ -10,7 +10,6 @@ env: CARGO_NET_RETRY: 2 RUSTFLAGS: "--cfg tokio_unstable" RUSTUP_MAX_RETRIES: 10 - RUSTC_WRAPPER: "sccache" jobs: rustdoc: diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index e7067803a8..13bdbad88d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -36,7 +36,7 @@ jobs: uses: Swatinem/rust-cache@v2 with: cache-directories: ~/.cache/sccache - shared-key: build + shared-key: nox save-if: false - name: Setup sccache @@ -59,6 +59,13 @@ jobs: - name: Run cargo nextest run: cargo nextest run --release --all-features --profile ci + - name: Run cargo clippy + uses: giraffate/clippy-action@v1 + with: + reporter: github-pr-review + clippy_flags: -Z unstable-options --all + fail_on_error: true + - name: Upload test report uses: dorny/test-reporter@v1 if: success() || failure() From 8bcc59361dc5771a4141f49a90ba127292ec1f12 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 10:42:22 +0300 Subject: [PATCH 07/16] Fix --- .github/workflows/lint.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index ab21cc979b..0e92f3936d 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -38,8 +38,7 @@ jobs: runs-on: ubuntu-latest env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" - RUSTC_WRAPPER: "sccache" + RUSTFLAGS: "-D warnings --cfg tokio_unstable" steps: - name: Checkout From c3fc3477daa2370579dd2aedbaf65c135f5a3d19 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:15:16 +0300 Subject: [PATCH 08/16] Build then clippy then fmt in lints --- .github/workflows/lint.yml | 30 ++++++++++++++++++++++++++++-- .github/workflows/tests.yml | 7 ------- 2 files changed, 28 insertions(+), 9 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 0e92f3936d..55f29fa895 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -35,10 +35,11 @@ jobs: fail_on_error: true cargo: - runs-on: ubuntu-latest + runs-on: builder env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable" + RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" + RUSTC_WRAPPER: "sccache" steps: - name: Checkout @@ -47,5 +48,30 @@ jobs: - name: Setup Rust toolchain uses: dsherret/rust-toolchain-file@v1 + - name: Setup cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: ~/.cache/sccache + shared-key: nox + save-if: false + + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 + + - name: Setup mold linker + uses: rui314/setup-mold@v1 + with: + make-default: false + + - name: Run cargo build + run: cargo build + - name: Run cargo fmt run: cargo fmt --all -- --check + + - name: Run cargo clippy + uses: giraffate/clippy-action@v1 + with: + reporter: github-pr-review + clippy_flags: -Z unstable-options --all + fail_on_error: true diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 13bdbad88d..0bbb5baa7d 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -59,13 +59,6 @@ jobs: - name: Run cargo nextest run: cargo nextest run --release --all-features --profile ci - - name: Run cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: github-pr-review - clippy_flags: -Z unstable-options --all - fail_on_error: true - - name: Upload test report uses: dorny/test-reporter@v1 if: success() || failure() From faac0c55031c751be82da3004aceefd05fa81940 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:22:22 +0300 Subject: [PATCH 09/16] Update --- .github/workflows/action-lints.yml | 25 ++++++++++++ .../workflows/{lint.yml => cargo-lints.yml} | 38 ++++--------------- .github/workflows/pr-lints.yml | 21 ++++++++++ 3 files changed, 54 insertions(+), 30 deletions(-) create mode 100644 .github/workflows/action-lints.yml rename .github/workflows/{lint.yml => cargo-lints.yml} (59%) create mode 100644 .github/workflows/pr-lints.yml diff --git a/.github/workflows/action-lints.yml b/.github/workflows/action-lints.yml new file mode 100644 index 0000000000..be5f8b812f --- /dev/null +++ b/.github/workflows/action-lints.yml @@ -0,0 +1,25 @@ +name: action lints + +on: + pull_request: + paths: + - ".github/workflows/**" + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + reviewdog: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Lint actions + uses: reviewdog/action-actionlint@v1 + env: + SHELLCHECK_OPTS: "-e SC2086 -e SC2207 -e SC2128" + with: + reporter: github-pr-check + fail_on_error: true diff --git a/.github/workflows/lint.yml b/.github/workflows/cargo-lints.yml similarity index 59% rename from .github/workflows/lint.yml rename to .github/workflows/cargo-lints.yml index 55f29fa895..2d86a5f531 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/cargo-lints.yml @@ -1,39 +1,17 @@ -name: lint +name: cargo lints on: pull_request: - types: - - opened - - edited - - synchronize + paths-ignore: + - "**.md" + - ".github/**" + - "!.github/workflows/cargo-lints.yml" concurrency: group: "${{ github.workflow }}-${{ github.ref }}" cancel-in-progress: true jobs: - pr: - name: Validate PR title - runs-on: ubuntu-latest - steps: - - uses: amannn/action-semantic-pull-request@v5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - - reviewdog: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Lint actions - uses: reviewdog/action-actionlint@v1 - env: - SHELLCHECK_OPTS: "-e SC2086 -e SC2207 -e SC2128" - with: - reporter: github-pr-check - fail_on_error: true - cargo: runs-on: builder @@ -63,11 +41,11 @@ jobs: with: make-default: false - - name: Run cargo build - run: cargo build + - name: Run cargo check + run: cargo check - name: Run cargo fmt - run: cargo fmt --all -- --check + uses: actions-rust-lang/rustfmt@v1 - name: Run cargo clippy uses: giraffate/clippy-action@v1 diff --git a/.github/workflows/pr-lints.yml b/.github/workflows/pr-lints.yml new file mode 100644 index 0000000000..1e985e759f --- /dev/null +++ b/.github/workflows/pr-lints.yml @@ -0,0 +1,21 @@ +name: PR lints + +on: + pull_request: + types: + - opened + - edited + - synchronize + +concurrency: + group: "${{ github.workflow }}-${{ github.ref }}" + cancel-in-progress: true + +jobs: + pr: + name: Validate PR title + runs-on: ubuntu-latest + steps: + - uses: amannn/action-semantic-pull-request@v5 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} From 50933bd36e8aec39f8363987489552f2904049d9 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:29:22 +0300 Subject: [PATCH 10/16] U --- .github/workflows/cargo-lints.yml | 55 ------------------- .../workflows/{action-lints.yml => lint.yml} | 14 ++++- .github/workflows/pr-lints.yml | 2 +- .github/workflows/run-tests.yml | 50 +++++++++++++++-- 4 files changed, 60 insertions(+), 61 deletions(-) delete mode 100644 .github/workflows/cargo-lints.yml rename .github/workflows/{action-lints.yml => lint.yml} (61%) diff --git a/.github/workflows/cargo-lints.yml b/.github/workflows/cargo-lints.yml deleted file mode 100644 index 2d86a5f531..0000000000 --- a/.github/workflows/cargo-lints.yml +++ /dev/null @@ -1,55 +0,0 @@ -name: cargo lints - -on: - pull_request: - paths-ignore: - - "**.md" - - ".github/**" - - "!.github/workflows/cargo-lints.yml" - -concurrency: - group: "${{ github.workflow }}-${{ github.ref }}" - cancel-in-progress: true - -jobs: - cargo: - runs-on: builder - - env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" - RUSTC_WRAPPER: "sccache" - - steps: - - name: Checkout - uses: actions/checkout@v3 - - - name: Setup Rust toolchain - uses: dsherret/rust-toolchain-file@v1 - - - name: Setup cache - uses: Swatinem/rust-cache@v2 - with: - cache-directories: ~/.cache/sccache - shared-key: nox - save-if: false - - - name: Setup sccache - uses: mozilla-actions/sccache-action@v0.0.3 - - - name: Setup mold linker - uses: rui314/setup-mold@v1 - with: - make-default: false - - - name: Run cargo check - run: cargo check - - - name: Run cargo fmt - uses: actions-rust-lang/rustfmt@v1 - - - name: Run cargo clippy - uses: giraffate/clippy-action@v1 - with: - reporter: github-pr-review - clippy_flags: -Z unstable-options --all - fail_on_error: true diff --git a/.github/workflows/action-lints.yml b/.github/workflows/lint.yml similarity index 61% rename from .github/workflows/action-lints.yml rename to .github/workflows/lint.yml index be5f8b812f..7011c8c16c 100644 --- a/.github/workflows/action-lints.yml +++ b/.github/workflows/lint.yml @@ -1,9 +1,10 @@ -name: action lints +name: lint on: pull_request: paths: - ".github/workflows/**" + - ".github/renovate.json" concurrency: group: "${{ github.workflow }}-${{ github.ref }}" @@ -23,3 +24,14 @@ jobs: with: reporter: github-pr-check fail_on_error: true + + renovate: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Renovate Config Validator + uses: tj-actions/renovate-config-validator@v2 + with: + config_file: .github/renovate.json diff --git a/.github/workflows/pr-lints.yml b/.github/workflows/pr-lints.yml index 1e985e759f..701b887660 100644 --- a/.github/workflows/pr-lints.yml +++ b/.github/workflows/pr-lints.yml @@ -12,7 +12,7 @@ concurrency: cancel-in-progress: true jobs: - pr: + title: name: Validate PR title runs-on: ubuntu-latest steps: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index ee17536084..e9a436c909 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -3,10 +3,10 @@ name: "test" on: pull_request: paths-ignore: - - "!**.md" - push: - branches: - - "master" + - "**.md" + - ".github/**" + - "!.github/workflows/run-tests.yml" + - "!.github/workflows/tests.yml" concurrency: group: "${{ github.workflow }}-${{ github.ref }}" @@ -17,3 +17,45 @@ jobs: uses: ./.github/workflows/tests.yml with: ref: ${{ github.ref }} + + lints: + runs-on: builder + + env: + RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" + RUSTC_WRAPPER: "sccache" + + steps: + - name: Checkout + uses: actions/checkout@v3 + + - name: Setup Rust toolchain + uses: dsherret/rust-toolchain-file@v1 + + - name: Setup cache + uses: Swatinem/rust-cache@v2 + with: + cache-directories: ~/.cache/sccache + shared-key: nox + save-if: false + + - name: Setup sccache + uses: mozilla-actions/sccache-action@v0.0.3 + + - name: Setup mold linker + uses: rui314/setup-mold@v1 + with: + make-default: false + + - name: Run cargo check + run: cargo check + + - name: Run cargo fmt + uses: actions-rust-lang/rustfmt@v1 + + - name: Run cargo clippy + uses: giraffate/clippy-action@v1 + with: + reporter: github-pr-review + clippy_flags: -Z unstable-options --all + fail_on_error: true From 1faaf3010a90700ebd6c5f41c61b1ac3c81de910 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:33:03 +0300 Subject: [PATCH 11/16] Reuse build workflow --- .github/workflows/publish.yml | 59 +++-------------------------------- 1 file changed, 5 insertions(+), 54 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index c793e8659a..4fe4fc2b61 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -21,65 +21,16 @@ on: required: true jobs: - nox: - name: "Build nox (${{ matrix.arch }})" - runs-on: builder - timeout-minutes: 60 - - permissions: - contents: write - id-token: write - - strategy: - fail-fast: false - matrix: - include: - - arch: x86_64 - env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable" - - arch: aarch64 - env: - RUSTFLAGS: "-D warnings --cfg tokio_unstable" - CARGO_TARGET_AARCH64_UNKNOWN_LINUX_GNU_LINKER: aarch64-linux-gnu-gcc - CC_aarch64_unknown_linux_gnu: aarch64-linux-gnu-gcc - CXX_aarch64_unknown_linux_gnu: aarch64-linux-gnu-g++ - - env: ${{ matrix.env }} - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - - - name: Setup Rust toolchain - uses: dsherret/rust-toolchain-file@v1 - - - name: Import secrets - uses: hashicorp/vault-action@v2.7.3 - with: - url: https://vault.fluence.dev - path: jwt/github - role: ci - method: jwt - jwtGithubAudience: "https://github.com/fluencelabs" - jwtTtl: 300 - exportToken: false - secrets: | - kv/crates.io/fluencebot token | CARGO_REGISTRY_TOKEN - - - name: Run cargo build - run: cargo build --release -p nox --target ${{ matrix.arch }}-unknown-linux-gnu - - - name: Upload nox binary - uses: actions/upload-artifact@v3 - with: - name: nox-${{ matrix.arch }} - path: target/${{ matrix.arch }}-unknown-linux-gnu/release/nox + build: + uses: ./.github/workflows/build.yml + with: + ref: ${{ github.ref }} upload: runs-on: ubuntu-latest timeout-minutes: 60 - needs: nox + needs: build permissions: contents: write From 2b021a75d2d86508582114ae27d0a21ffd80f1a3 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:35:34 +0300 Subject: [PATCH 12/16] fmt last --- .github/workflows/run-tests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index e9a436c909..801220c427 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -50,12 +50,12 @@ jobs: - name: Run cargo check run: cargo check - - name: Run cargo fmt - uses: actions-rust-lang/rustfmt@v1 - - name: Run cargo clippy uses: giraffate/clippy-action@v1 with: reporter: github-pr-review clippy_flags: -Z unstable-options --all fail_on_error: true + + - name: Run cargo fmt + uses: actions-rust-lang/rustfmt@v1 From 7baec6581a47dfa9c3812931902762c01b6e2f14 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:36:16 +0300 Subject: [PATCH 13/16] Try ubuntu latest --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 801220c427..9fd2c5886d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,7 @@ jobs: ref: ${{ github.ref }} lints: - runs-on: builder + runs-on: ubuntu-latest env: RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" From 107e51542eb14076a9ea84658da94082a24d63f6 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:37:15 +0300 Subject: [PATCH 14/16] Renames --- .github/workflows/{pr-lints.yml => lint-pr.yml} | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) rename .github/workflows/{pr-lints.yml => lint-pr.yml} (96%) diff --git a/.github/workflows/pr-lints.yml b/.github/workflows/lint-pr.yml similarity index 96% rename from .github/workflows/pr-lints.yml rename to .github/workflows/lint-pr.yml index 701b887660..e1c14b5944 100644 --- a/.github/workflows/pr-lints.yml +++ b/.github/workflows/lint-pr.yml @@ -1,4 +1,4 @@ -name: PR lints +name: lint PR on: pull_request: From 5f4f01c2a061568a19032bc9449e6a9d554f6822 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:45:29 +0300 Subject: [PATCH 15/16] Back to builder --- .github/workflows/run-tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 9fd2c5886d..801220c427 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -19,7 +19,7 @@ jobs: ref: ${{ github.ref }} lints: - runs-on: ubuntu-latest + runs-on: builder env: RUSTFLAGS: "-D warnings --cfg tokio_unstable -C link-arg=-B/usr/local/bin/mold" From 8fa71918efc3bcbac73e89abc37ff3d53714be50 Mon Sep 17 00:00:00 2001 From: Anatoly Laskaris Date: Fri, 4 Aug 2023 11:51:33 +0300 Subject: [PATCH 16/16] Better container cache --- .github/workflows/container.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/container.yml b/.github/workflows/container.yml index d661f85421..5b81741694 100644 --- a/.github/workflows/container.yml +++ b/.github/workflows/container.yml @@ -122,7 +122,10 @@ jobs: run_number=${{ github.run_number }} run_attempt=${{ github.run_attempt }} cache-from: type=gha - cache-to: type=gha,mode=max + # github allows only 10GB of cache + # so save cache only on merge to master + # to use less space and speed up CI + cache-to: ${{ github.event == 'push' && 'type=gha,mode=max' || '' }} - name: Print results to check summary if: always()