From b87086f3e897af126327e0aa94e55a81dda0b498 Mon Sep 17 00:00:00 2001 From: Alexander Gil Date: Tue, 20 Dec 2022 15:18:57 +0100 Subject: [PATCH 1/5] fix(ci): Update to node16 github actions node12 github actions will be deprecated Signed-off-by: Alexander Gil --- .github/workflows/aur-publish.yml | 2 +- .github/workflows/commitlint.yml | 2 +- .github/workflows/docker_images.yml | 4 ++-- .github/workflows/pages.yml | 2 +- .github/workflows/rust.yml | 8 ++++---- 5 files changed, 9 insertions(+), 9 deletions(-) diff --git a/.github/workflows/aur-publish.yml b/.github/workflows/aur-publish.yml index bfcdba05..a72532ae 100644 --- a/.github/workflows/aur-publish.yml +++ b/.github/workflows/aur-publish.yml @@ -9,7 +9,7 @@ jobs: aur-publish: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Extract crate information shell: bash diff --git a/.github/workflows/commitlint.yml b/.github/workflows/commitlint.yml index 64d78865..c470e303 100644 --- a/.github/workflows/commitlint.yml +++ b/.github/workflows/commitlint.yml @@ -7,7 +7,7 @@ jobs: env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 with: fetch-depth: 0 - uses: wagoid/commitlint-github-action@v1.6.0 diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 660ba3c9..5332fddf 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -14,7 +14,7 @@ jobs: test: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install stable toolchain uses: actions-rs/toolchain@v1 @@ -37,7 +37,7 @@ jobs: if: github.event_name == 'push' steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 02a47955..877ee774 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -12,7 +12,7 @@ jobs: deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Install stable toolchain uses: actions-rs/toolchain@v1 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index e1b22d6b..0b4363e9 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -14,7 +14,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install fmt with stable toolchain uses: actions-rs/toolchain@v1 @@ -31,7 +31,7 @@ jobs: runs-on: ubuntu-latest steps: - name: Checkout sources - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install clippy with stable toolchain uses: actions-rs/toolchain@v1 @@ -50,7 +50,7 @@ jobs: runs-on: ubuntu-20.04 steps: - name: Checkout source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Extract min supported rust version shell: bash @@ -98,7 +98,7 @@ jobs: container: ${{ matrix.job.container }} steps: - name: Checkout source code - uses: actions/checkout@v2 + uses: actions/checkout@v3 - name: Install prerequisites shell: bash From 0c6d3026b0f2358d9144243f3172aefc35b1a3a3 Mon Sep 17 00:00:00 2001 From: Alexander Gil Date: Mon, 23 Jan 2023 17:25:51 +0100 Subject: [PATCH 2/5] fix(ci): Replace `actions-rs/toolchain` with `dtolnay/rust-toolchain` Because node version is going to be deprecated Signed-off-by: Alexander Gil --- .github/workflows/docker_images.yml | 16 ++++++++-------- .github/workflows/pages.yml | 10 +++++----- .github/workflows/rust.yml | 15 +++++---------- 3 files changed, 18 insertions(+), 23 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index 5332fddf..efafe411 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -17,10 +17,10 @@ jobs: - uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + id: toolchain + uses: dtolnay/rust-toolchain@master + + - run: rustup override set ${{steps.toolchain.outputs.name}} - uses: Swatinem/rust-cache@v2 @@ -40,10 +40,10 @@ jobs: - uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - override: true + id: toolchain + uses: dtolnay/rust-toolchain@master + + - run: rustup override set ${{steps.toolchain.outputs.name}} - name: Build image run: make images diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index 877ee774..ed5f37f8 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -15,11 +15,11 @@ jobs: - uses: actions/checkout@v3 - name: Install stable toolchain - uses: actions-rs/toolchain@v1 - with: - toolchain: stable - components: rustfmt - override: true + id: toolchain + uses: dtolnay/rust-toolchain@master + + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup component add rustfmt - run: | cargo install mdbook --version 0.4.25 diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 0b4363e9..50dd857f 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,11 +17,10 @@ jobs: uses: actions/checkout@v3 - name: Install fmt with stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: stable components: rustfmt - override: true - name: Run cargo fmt run: cargo fmt --all -- --check @@ -34,11 +33,10 @@ jobs: uses: actions/checkout@v3 - name: Install clippy with stable toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: stable components: clippy - override: true - uses: actions-rs/clippy-check@v1 with: @@ -58,12 +56,10 @@ jobs: echo "MIN_SUPPORTED_RUST_VERSION=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV - name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }}) - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }} - default: true components: clippy - profile: minimal - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) uses: actions-rs/cargo@v1 @@ -115,11 +111,10 @@ jobs: key: ${{ matrix.job.target }} - name: Install Rust toolchain - uses: actions-rs/toolchain@v1 + uses: dtolnay/rust-toolchain@stable with: toolchain: stable - target: ${{ matrix.job.target }} - override: true + targets: ${{ matrix.job.target }} - name: Run tests uses: actions-rs/cargo@v1 From edab63bdf3b50b5ec26a198c4006355156e66a05 Mon Sep 17 00:00:00 2001 From: Alexander Gil Date: Thu, 24 Aug 2023 15:35:47 +0200 Subject: [PATCH 3/5] fix: Cargo clippy errors Signed-off-by: Alexander Gil --- rash_core/src/modules/find.rs | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/rash_core/src/modules/find.rs b/rash_core/src/modules/find.rs index 0c1cf02f..e49af42b 100644 --- a/rash_core/src/modules/find.rs +++ b/rash_core/src/modules/find.rs @@ -52,10 +52,9 @@ use serde_yaml::Value; #[cfg(feature = "docs")] use strum_macros::{Display, EnumString}; -#[derive(Debug, PartialEq, Deserialize)] +#[derive(Debug, Default, PartialEq, Deserialize)] #[cfg_attr(feature = "docs", derive(EnumString, Display, JsonSchema))] #[serde(rename_all = "lowercase")] -#[derive(Default)] enum FileType { Any, Directory, From be94d63158c0cca43917c525d53b4bfa45ce434e Mon Sep 17 00:00:00 2001 From: Alexander Gil Date: Thu, 24 Aug 2023 15:41:59 +0200 Subject: [PATCH 4/5] fix(ci): Change dtolnay/rust-toolchaint to stable Signed-off-by: Alexander Gil --- .github/workflows/docker_images.yml | 4 ++-- .github/workflows/pages.yml | 2 +- .github/workflows/rust.yml | 25 ++++++++++++++++--------- 3 files changed, 19 insertions(+), 12 deletions(-) diff --git a/.github/workflows/docker_images.yml b/.github/workflows/docker_images.yml index efafe411..791eefd6 100644 --- a/.github/workflows/docker_images.yml +++ b/.github/workflows/docker_images.yml @@ -18,7 +18,7 @@ jobs: - name: Install stable toolchain id: toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@stable - run: rustup override set ${{steps.toolchain.outputs.name}} @@ -41,7 +41,7 @@ jobs: - name: Install stable toolchain id: toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@stable - run: rustup override set ${{steps.toolchain.outputs.name}} diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index ed5f37f8..9d74ab65 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -16,7 +16,7 @@ jobs: - name: Install stable toolchain id: toolchain - uses: dtolnay/rust-toolchain@master + uses: dtolnay/rust-toolchain@stable - run: rustup override set ${{steps.toolchain.outputs.name}} - run: rustup component add rustfmt diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 50dd857f..f88ffdbc 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -17,10 +17,11 @@ jobs: uses: actions/checkout@v3 - name: Install fmt with stable toolchain + id: toolchain uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: rustfmt + + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup component add rustfmt - name: Run cargo fmt run: cargo fmt --all -- --check @@ -33,10 +34,11 @@ jobs: uses: actions/checkout@v3 - name: Install clippy with stable toolchain + id: toolchain uses: dtolnay/rust-toolchain@stable - with: - toolchain: stable - components: clippy + + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup component add clippy - uses: actions-rs/clippy-check@v1 with: @@ -56,10 +58,13 @@ jobs: echo "MIN_SUPPORTED_RUST_VERSION=$(sed -n 's/^rust-version = "\(.*\)"/\1/p' Cargo.toml | head -n1)" >> $GITHUB_ENV - name: Install rust toolchain (v${{ env.MIN_SUPPORTED_RUST_VERSION }}) - uses: dtolnay/rust-toolchain@stable + id: toolchain + uses: dtolnay/rust-toolchain@master with: toolchain: ${{ env.MIN_SUPPORTED_RUST_VERSION }} - components: clippy + + - run: rustup override set ${{steps.toolchain.outputs.name}} + - run: rustup component add clippy - name: Run clippy (on minimum supported rust version to prevent warnings we can't fix) uses: actions-rs/cargo@v1 @@ -111,11 +116,13 @@ jobs: key: ${{ matrix.job.target }} - name: Install Rust toolchain + id: toolchain uses: dtolnay/rust-toolchain@stable with: - toolchain: stable targets: ${{ matrix.job.target }} + - run: rustup override set ${{steps.toolchain.outputs.name}} + - name: Run tests uses: actions-rs/cargo@v1 with: From 9f2e2ddd8da2f913d71b07a0ee8a8caa15d9b495 Mon Sep 17 00:00:00 2001 From: Alexander Gil Date: Thu, 24 Aug 2023 16:06:27 +0200 Subject: [PATCH 5/5] fix(ci): Remove container and downgrade to ubuntu 20 This will keep minimum glibc version required to 2.31 Signed-off-by: Alexander Gil --- .github/workflows/rust.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index f88ffdbc..6b69e1de 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -88,15 +88,15 @@ jobs: fail-fast: false matrix: job: + # cross minimum glibc version is 2.32 - { os: ubuntu-22.04, target: arm-unknown-linux-gnueabihf, use-cross: true } - { os: ubuntu-22.04, target: aarch64-unknown-linux-gnu, use-cross: true } - { os: ubuntu-22.04, target: x86_64-unknown-linux-musl, use-cross: true } - - { os: ubuntu-22.04, target: x86_64-unknown-linux-gnu, container: quay.io/pypa/manylinux2014_x86_64} + # use ubuntu 20.04 to keep minimum glibc version to 2.31 + - { os: ubuntu-20.04, target: x86_64-unknown-linux-gnu} - { os: macos-12, target: x86_64-apple-darwin} name: (${{ matrix.job.os }}) ${{ matrix.job.target }} runs-on: ${{ matrix.job.os }} - # Use a container with GLIBC 2.17, make build compatible until that version - container: ${{ matrix.job.container }} steps: - name: Checkout source code uses: actions/checkout@v3