fixup! wip2
Cargo manifest lints / Lint Cargo manifests on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Has been cancelled Details
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Has been cancelled Details
Run Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Failing after 34s Details

Manos Pitsidianakis 2024-05-08 20:57:40 +03:00
parent 034e4ac403
commit f71ebb2a4c
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
5 changed files with 32 additions and 58 deletions

View File

@ -37,15 +37,16 @@ jobs:
run: |
apt-get update
apt-get install -y mandoc debhelper quilt build-essential
- name: Configure cargo data directory
run: |
echo "CARGO_HOME=${HOME}/.cargo" >> $GITHUB_ENV
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- id: rustup-setup
name: Install rustup and toolchains
shell: bash
run: |
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
source "${HOME}/.cargo/env"
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
echo "CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}" >> $GITHUB_ENV
rustup toolchain install --profile minimal ${{ matrix.rust }} --target ${{ matrix.target }}
rustup default ${{ matrix.rust }}
fi

View File

@ -36,6 +36,10 @@ jobs:
run: |
apt-get update
apt-get install -y libdbus-1-dev pkg-config mandoc libssl-dev
- name: Configure cargo data directory
run: |
echo "CARGO_HOME=${HOME}/.cargo" >> $GITHUB_ENV
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
#- id: cache-rustup
# name: Cache Rust toolchain
# uses: https://github.com/actions/cache@v3
@ -49,24 +53,8 @@ jobs:
run: |
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
source "${HOME}/.cargo/env"
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
rustup toolchain install --profile minimal ${{ matrix.rust }} --target ${{ matrix.target }}
fi
- name: Configure cargo data directory
# After this point, all cargo registry and crate data is stored in
# $GITHUB_WORKSPACE/.cargo_home. This allows us to cache only the files
# that are needed during the build process. Additionally, this works
# around a bug in the 'cache' action that causes directories outside of
# the workspace dir to be saved/restored incorrectly.
run: echo "CARGO_HOME=$(pwd)/.cargo_home" >> $GITHUB_ENV
#- id: cache-cargo
# name: Cache cargo configuration and installations
# uses: https://github.com/actions/cache@v3
# with:
# path: ${{ env.CARGO_HOME }}
# key: cargo-${{ matrix.os }}-${{ matrix.rust }}
#- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
- name: Setup Rust target
run: |
mkdir -p "${{ env.CARGO_HOME }}"

View File

@ -41,6 +41,10 @@ jobs:
run: |
apt-get update
apt-get install -y libdbus-1-dev pkg-config mandoc libssl-dev
- name: Configure cargo data directory
run: |
echo "CARGO_HOME=${HOME}/.cargo" >> $GITHUB_ENV
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
#- id: cache-rustup
# name: Cache Rust toolchain
# uses: https://github.com/actions/cache@v3
@ -54,25 +58,9 @@ jobs:
run: |
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
source "${HOME}/.cargo/env"
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
rustup toolchain install --profile minimal --component clippy,rustfmt --target ${{ matrix.target }} -- "${{ matrix.rust }}"
rustup default ${{ matrix.rust }}
fi
- name: Configure cargo data directory
# After this point, all cargo registry and crate data is stored in
# $GITHUB_WORKSPACE/.cargo_home. This allows us to cache only the files
# that are needed during the build process. Additionally, this works
# around a bug in the 'cache' action that causes directories outside of
# the workspace dir to be saved/restored incorrectly.
run: echo "CARGO_HOME=$(pwd)/.cargo_home" >> $GITHUB_ENV
#- id: cache-cargo
# name: Cache cargo configuration and installations
# uses: https://github.com/actions/cache@v3
# with:
# path: ${{ env.CARGO_HOME }}
# key: cargo-${{ matrix.os }}-${{ matrix.rust }}
#- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
- name: Setup Rust target
run: |
mkdir -p "${{ env.CARGO_HOME }}"

View File

@ -44,15 +44,16 @@ jobs:
apt-get install -y mandoc
- name: Find meli MSRV from meli/Cargo.toml.
run: echo MELI_MSRV=$(grep -m1 rust-version meli/Cargo.toml | head -n1 | cut -d'"' -f 2 | head -n1) >> $GITHUB_ENV
- name: Configure cargo data directory
run: |
echo "CARGO_HOME=${HOME}/.cargo" >> $GITHUB_ENV
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- id: rustup-setup
name: Install Rustup and toolchains
shell: bash
run: |
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
source "${HOME}/.cargo/env"
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
echo "CARGO_HOME=${CARGO_HOME:-$HOME/.cargo}" >> $GITHUB_ENV
rustup toolchain install --profile minimal --component "rustfmt" --target "${{ matrix.target }}" -- "${{ env.MELI_MSRV }}"
rustup component add rustfmt --toolchain ${{ env.MELI_MSRV }}-${{ matrix.target }}
rustup toolchain install --profile minimal --component "rustfmt" --target "${{ matrix.target }}" -- "${{ matrix.rust }}"
@ -69,19 +70,16 @@ jobs:
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
name: Add manifest lint dependencies
run: |
source "${HOME}/.cargo/env"
cargo install --quiet --version 1.0.9 --target "${{ matrix.target }}" cargo-sort
cargo install --quiet --version 0.15.1 --target "${{ matrix.target }}" cargo-msrv
- name: cargo-msrv verify melib MSRV
if: success() || failure()
run: |
source "${HOME}/.cargo/env"
cargo-msrv --output-format json --log-level trace --log-target stdout --path meli verify
cargo-msrv --output-format json --log-level trace --log-target stdout --path melib verify
- name: cargo-sort
if: success() || failure()
run: |
source "${HOME}/.cargo/env"
cargo-sort --check --check-format --grouped --order package,bin,lib,dependencies,features,build-dependencies,dev-dependencies,workspace fuzz
cargo-sort --check --check-format --grouped --order package,bin,lib,dependencies,features,build-dependencies,dev-dependencies,workspace tools
cargo-sort --check --check-format --grouped --order package,bin,lib,dependencies,features,build-dependencies,dev-dependencies,workspace --workspace

View File

@ -41,12 +41,18 @@ jobs:
run: |
apt-get update
apt-get install -y libdbus-1-dev pkg-config mandoc libssl-dev make
- name: Find meli MSRV from meli/Cargo.toml.
run: echo MELI_MSRV=$(grep -m1 rust-version meli/Cargo.toml | head -n1 | cut -d'"' -f 2 | head -n1) >> $GITHUB_ENV
- name: Configure cargo data directory
run: |
echo "CARGO_HOME=${HOME}/.cargo" >> $GITHUB_ENV
echo "${HOME}/.cargo/bin" >> $GITHUB_PATH
- id: cache-rustup
name: Cache Rust toolchain
uses: https://github.com/Swatinem/rust-cache@v2
uses: https://code.forgejo.org/actions/cache@v4
with:
path: ~/.rustup
key: toolchain-${{ matrix.os }}-${{ matrix.rust }}
key: toolchain-${{ matrix.os }}-${{ env.MELI_MSRV }}
- if: ${{ steps.cache-rustup.outputs.cache-hit != 'true' }}
id: rustup-setup
name: Install rustup and toolchains
@ -54,23 +60,20 @@ jobs:
run: |
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
source "${HOME}/.cargo/env"
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
rustup toolchain install --profile minimal ${{ matrix.rust }} --target ${{ matrix.target }}
rustup toolchain install --profile minimal --target "${{ matrix.target }}" -- "${{ env.MELI_MSRV }}"
rustup toolchain install --profile minimal --target "${{ matrix.target }}" -- "${{ matrix.rust }}"
rustup default ${{ env.MELI_MSRV }}
fi
- name: Configure cargo data directory
# After this point, all cargo registry and crate data is stored in
# $GITHUB_WORKSPACE/.cargo_home. This allows us to cache only the files
# that are needed during the build process. Additionally, this works
# around a bug in the 'cache' action that causes directories outside of
# the workspace dir to be saved/restored incorrectly.
run: echo "CARGO_HOME=$(pwd)/.cargo_home" >> $GITHUB_ENV
- id: cache-cargo
name: Cache cargo configuration and installations
uses: https://github.com/Swatinem/rust-cache@v2
with:
path: ${{ env.CARGO_HOME }}
key: cargo-${{ matrix.os }}-${{ matrix.rust }}
key: cargo-${{ matrix.os }}-${{ env.MELI_MSRV }}
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
name: Add test dependencies
run: |
cargo +${{ matrix.rust }} install --quiet --version 0.9.54 --target "${{ matrix.target }}" cargo-nextest
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
name: Setup Rust target
run: |
@ -79,10 +82,6 @@ jobs:
[build]
target = "${{ matrix.target }}"
EOF
- if: ${{ steps.cache-cargo.outputs.cache-hit != 'true' }} && matrix.target
name: Add test dependencies
run: |
cargo install --quiet --version 0.9.54 --target "${{ matrix.target }}" cargo-nextest
- name: cargo-check
run: |
cargo check --all-features --all --tests --examples --benches --bins