Run rust_build CI between multiple Rust versions (#2939)

* Add rust_build_next job to test upcoming Rust versions

This way, build failures on a upcoming Rust version can be found
earlier, and doesn't hold new Kanidm releases.

* yamlllinttttt the GitHub workflows

---------

Co-authored-by: James Hodgkinson <james@terminaloutcomes.com>
This commit is contained in:
fossdd 2024-07-30 00:08:26 +00:00 committed by GitHub
parent b669a681f1
commit 3298eecc8a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
5 changed files with 76 additions and 22 deletions

View file

@ -69,5 +69,7 @@ jobs:
- name: Push image to GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/kanidm-docker.tar:devel" "ghcr.io/${{ github.repository_owner }}/kanidm:devel"
echo "${{ secrets.GITHUB_TOKEN }}" | \
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/kanidm-docker.tar:devel" \
"ghcr.io/${{ github.repository_owner }}/kanidm:devel"

View file

@ -85,5 +85,7 @@ jobs:
- name: Push image to GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/kanidmd-docker.tar:devel" "ghcr.io/${{ github.repository_owner }}/kanidmd:devel"
echo "${{ secrets.GITHUB_TOKEN }}" | \
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/kanidmd-docker.tar:devel" \
"ghcr.io/${{ github.repository_owner }}/kanidmd:devel"

View file

@ -69,5 +69,7 @@ jobs:
# features, but ORAS will: https://oras.land/docs/commands/oras_copy
- name: Push image to GHCR
run: |
echo "${{ secrets.GITHUB_TOKEN }}" | oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/radius-docker.tar:devel" "ghcr.io/${{ github.repository_owner }}/radius:devel"
echo "${{ secrets.GITHUB_TOKEN }}" | \
oras login -u "${{ github.actor }}" --password-stdin ghcr.io
oras copy --from-oci-layout "/tmp/radius-docker.tar:devel" \
"ghcr.io/${{ github.repository_owner }}/radius:devel"

View file

@ -55,6 +55,54 @@ jobs:
- name: "Check disk space at the end"
run:
du -shc *
rust_build_next:
# build future versions to find possible next-version bugs
runs-on: ubuntu-latest
continue-on-error: true
env:
SCCACHE_GHA_ENABLED: true
RUSTC_WRAPPER: sccache
CARGO_INCREMENTAL: 0
CARGO_TERM_COLOR: always
strategy:
matrix:
rust_version: ['beta', 'nightly']
steps:
- uses: actions/checkout@v4
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust_version }}
- name: Setup sccache
uses: mozilla-actions/sccache-action@v0.0.5
with:
version: "v0.4.2"
- name: Install dependencies
run: |
sudo apt-get update && \
sudo apt-get install -y \
libpam0g-dev \
libudev-dev \
libssl-dev
- name: "Build the workspace"
run: cargo build --workspace
- name: "Check disk space and size of target, then clean it"
run: |
df -h
echo "Checking base dir"
du -shc *
echo "Checking target dir"
du -shc target/*
rm -rf target/*
- name: "Run cargo test"
run: cargo test
- name: "Check disk space at the end"
run:
du -shc *
run_release:
runs-on: ubuntu-latest
env: