From 57045a68ac3a90fcff9933e9366dda3e6a8153b5 Mon Sep 17 00:00:00 2001 From: Oleksandr Pravdyvyi Date: Mon, 25 Nov 2024 08:13:30 +0200 Subject: [PATCH] fix: ci test 5 --- .github/workflows/ci.yml | 63 ++++++++++++++------------------------- ci_scripts/build-macos.sh | 2 +- ci_scripts/lint-ubuntu.sh | 9 ++++++ 3 files changed, 32 insertions(+), 42 deletions(-) create mode 100644 ci_scripts/lint-ubuntu.sh diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 21a6889..715b985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,48 +49,29 @@ jobs: if: success() || failure() run: chmod 777 ./ci_scripts/build-macos.sh && ./ci_scripts/build-macos.sh - # lint: - # strategy: - # matrix: - # platform: [ ubuntu-latest ] - # runs-on: ${{ matrix.platform }} - # timeout-minutes: 60 + lint: + strategy: + matrix: + platform: [ ubuntu-latest ] + runs-on: ${{ matrix.platform }} + timeout-minutes: 60 + + name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} + steps: + - name: Checkout sources + uses: actions/checkout@v3 + - name: Install stable toolchain + uses: actions-rs/toolchain@v1 + with: + profile: minimal + toolchain: nightly + override: true + components: rustfmt, clippy + - name: lint - ubuntu-latest + if: success() || failure() + run: chmod 777 ./ci_scripts/lint-ubuntu.sh && ./ci_scripts/lint-ubuntu.sh + - # name: lint - ${{ matrix.crate }} - ${{ matrix.platform }} - # steps: - # - name: Checkout sources - # uses: actions/checkout@v3 - # - name: Install stable toolchain - # uses: actions-rs/toolchain@v1 - # with: - # profile: minimal - # toolchain: nightly - # override: true - # components: rustfmt, clippy - # - uses: Swatinem/rust-cache@v2 - # - name: cargo fmt - # if: success() || failure() - # run: cargo fmt -- --check - # - name: cargo clippy - # if: success() || failure() - # run: | - # cargo clippy --release -- -D warnings - # - name: install risc0 - # if: success() || failure() - # run: | - # curl -L https://risczero.com/install | bash - # - name: install risc0 step 2 - # if: success() || failure() - # run: | - # source /home/runner/.bashrc && rzup install && source /home/runner/.bashrc - # - name: install taplo - # if: success() || failure() - # run: | - # cargo install taplo-cli --locked - # - name: taplo fmt - # if: success() || failure() - # run: | - # taplo fmt --check # test: # strategy: # matrix: diff --git a/ci_scripts/build-macos.sh b/ci_scripts/build-macos.sh index 506fec6..e3332f6 100644 --- a/ci_scripts/build-macos.sh +++ b/ci_scripts/build-macos.sh @@ -1,4 +1,4 @@ set -e curl -L https://risczero.com/install | bash -/Users/.risc0/bin/rzup install +/Users/runner/.risc0/bin/rzup install cargo build \ No newline at end of file diff --git a/ci_scripts/lint-ubuntu.sh b/ci_scripts/lint-ubuntu.sh new file mode 100644 index 0000000..e139cdd --- /dev/null +++ b/ci_scripts/lint-ubuntu.sh @@ -0,0 +1,9 @@ +set -e + +curl -L https://risczero.com/install | bash +/home/runner/.risc0/bin/rzup install +cargo install taplo-cli --locked + +cargo fmt -- --check +cargo clippy --release -- -D warnings +taplo fmt --check \ No newline at end of file