fixup! wip2
Run cargo lints / Lint on ${{ matrix.build }} (linux-amd64, ubuntu-latest, stable, x86_64-unknown-linux-gnu) (pull_request) Has been cancelled Details
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 Tests / Test on ${{ matrix.build }} (linux-amd64, ubuntu-latest, x86_64-unknown-linux-gnu) (pull_request) Failing after 48s Details

Manos Pitsidianakis 2024-05-08 20:57:40 +03:00
parent 034e4ac403
commit d57b100057
Signed by: Manos Pitsidianakis
GPG Key ID: 7729C7707F7E09D0
1 changed files with 9 additions and 12 deletions

View File

@ -32,7 +32,6 @@ jobs:
include:
- build: linux-amd64
os: ubuntu-latest
rust: stable
target: x86_64-unknown-linux-gnu
steps:
- uses: actions/checkout@v3
@ -41,12 +40,16 @@ 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=$(pwd)/.cargo" >> $GITHUB_ENV
- 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
@ -56,21 +59,15 @@ jobs:
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 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: Setup Rust target
run: |