Skip to content

Commit

Permalink
Merge pull request #23 from Foundation-Devices/jeandudey/sft-3331-upd…
Browse files Browse the repository at this point in the history
…ate-fsfereuse-action-on-foundation-rs

SFT-3331: Update fsfe/reuse-action.
  • Loading branch information
jeandudey committed Feb 7, 2024
2 parents a912b60 + a4f5061 commit 72a6580
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 15 deletions.
19 changes: 14 additions & 5 deletions .github/actions/rust-toolchain/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ runs:
- run: |
: install rustup if needed
if ! command -v rustup &>/dev/null; then
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused -fsSL "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
curl --proto '=https' --tlsv1.2 --retry 10 --retry-connrefused --location --silent --show-error --fail "https://sh.rustup.rs" | sh -s -- --default-toolchain none -y
echo "${CARGO_HOME:-$HOME/.cargo}/bin" >> $GITHUB_PATH
fi
if: runner.os != 'Windows'
Expand Down Expand Up @@ -99,16 +99,25 @@ runs:
- run: |
: enable Cargo sparse registry
# except on 1.66 and 1.67, on which it is unstable
# implemented in 1.66, stabilized in 1.68, made default in 1.70
if [ -z "${CARGO_REGISTRIES_CRATES_IO_PROTOCOL+set}" -o -f "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol ]; then
touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | (! grep -q '^release: 1\.6[67]\.'); then
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[89]\.'; then
touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=sparse >> $GITHUB_ENV
else
elif rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.6[67]\.'; then
touch "${{runner.temp}}"/.implicit_cargo_registries_crates_io_protocol || true
echo CARGO_REGISTRIES_CRATES_IO_PROTOCOL=git >> $GITHUB_ENV
fi
fi
shell: bash
- run: |
: work around spurious network errors in curl 8.0
# https://rust-lang.zulipchat.com/#narrow/stream/246057-t-cargo/topic/timeout.20investigation
if rustc +${{steps.parse.outputs.toolchain}} --version --verbose | grep -q '^release: 1\.7[01]\.'; then
echo CARGO_HTTP_MULTIPLEXING=false >> $GITHUB_ENV
fi
shell: bash
- run: rustc +${{steps.parse.outputs.toolchain}} --version --verbose
shell: bash
4 changes: 2 additions & 2 deletions .github/workflows/dependencies.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: cargo install --locked cargo-audit
- run: cargo audit

Expand All @@ -27,7 +27,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: cargo install --locked cargo-sort
- run: cargo sort --workspace --check

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/ffi.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: cargo install cbindgen@^0.24
- run: |
cbindgen --config ffi/cbindgen.toml \
Expand All @@ -33,7 +33,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: sudo apt-get install -y cmake nlohmann-json3-dev
- run: |
cmake -S ffi/integration/ \
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: fsfe/reuse-action@v1
- uses: fsfe/reuse-action@v2

is-the-code-compilable:
name: Is the code compilable?
Expand All @@ -18,7 +18,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: cargo check
# The foundation-ffi crate won't compile for x86_64 targets because it
# requires a nightly Rust compiler for defining a global allocator and
Expand All @@ -36,7 +36,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
components: rustfmt
- run: cargo fmt --all -- --check

Expand All @@ -48,7 +48,7 @@ jobs:
- uses: actions/checkout@v4
- uses: ./.github/actions/rust-toolchain
with:
toolchain: 1.66
toolchain: 1.70
- run: cargo test
- run: cargo test --no-default-features
- run: cargo test --all-features
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ SPDX-License-Identifier: GPL-3.0-or-later

## Minimum Supported Rust Version (MSRV).

The minimum supported version Rust version is `1.65.0`.
The minimum supported version Rust version is `1.70`.

## Licensing

Expand Down
2 changes: 1 addition & 1 deletion rust-toolchain.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@

# Keep this in sync. with the CI.
[toolchain]
channel = "1.66"
channel = "1.70"
profile = "default"
targets = ["thumbv7em-none-eabihf"]

0 comments on commit 72a6580

Please sign in to comment.