Restructure project layout for better CI/CD integration
- Flattened nested bootupd/bootupd/ structure to root level - Moved all core project files to root directory - Added proper Debian packaging structure (debian/ directory) - Created build scripts and CI configuration - Improved project organization for CI/CD tools - All Rust source, tests, and configuration now at root level - Added GitHub Actions workflow for automated testing - Maintained all original functionality while improving structure
This commit is contained in:
parent
5e8730df43
commit
aaf662d5b1
87 changed files with 1334 additions and 570 deletions
119
.github/workflows/rust.yml
vendored
Executable file
119
.github/workflows/rust.yml
vendored
Executable file
|
|
@ -0,0 +1,119 @@
|
|||
# Maintained in https://github.com/coreos/repo-templates
|
||||
# Do not edit downstream.
|
||||
|
||||
name: Rust
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
permissions:
|
||||
contents: read
|
||||
|
||||
# don't waste job slots on superseded code
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
# Pinned toolchain for linting
|
||||
ACTIONS_LINTS_TOOLCHAIN: 1.84.1
|
||||
|
||||
jobs:
|
||||
tests-stable:
|
||||
name: Tests, stable toolchain
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Cache build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: cargo build
|
||||
run: cargo build --all-targets
|
||||
- name: cargo test
|
||||
run: cargo test --all-targets
|
||||
tests-release-stable:
|
||||
name: Tests (release), stable toolchain
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: stable
|
||||
- name: Cache build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: cargo build (release)
|
||||
run: cargo build --all-targets --release
|
||||
- name: cargo test (release)
|
||||
run: cargo test --all-targets --release
|
||||
tests-release-msrv:
|
||||
name: Tests (release), minimum supported toolchain
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Detect crate MSRV
|
||||
run: |
|
||||
msrv=$(cargo metadata --format-version 1 --no-deps | \
|
||||
jq -r '.packages[0].rust_version')
|
||||
echo "Crate MSRV: $msrv"
|
||||
echo "MSRV=$msrv" >> $GITHUB_ENV
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ env.MSRV }}
|
||||
- name: Cache build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: cargo build (release)
|
||||
run: cargo build --all-targets --release
|
||||
- name: cargo test (release)
|
||||
run: cargo test --all-targets --release
|
||||
linting:
|
||||
name: Lints, pinned toolchain
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ env.ACTIONS_LINTS_TOOLCHAIN }}
|
||||
components: rustfmt, clippy
|
||||
- name: Cache build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: cargo fmt (check)
|
||||
run: cargo fmt -- --check -l
|
||||
- name: cargo clippy (warnings)
|
||||
run: cargo clippy --all-targets -- -D warnings
|
||||
tests-other-channels:
|
||||
name: Tests, unstable toolchain
|
||||
runs-on: ubuntu-latest
|
||||
container: quay.io/coreos-assembler/fcos-buildroot:testing-devel
|
||||
continue-on-error: true
|
||||
strategy:
|
||||
matrix:
|
||||
channel: [beta, nightly]
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
uses: dtolnay/rust-toolchain@v1
|
||||
with:
|
||||
toolchain: ${{ matrix.channel }}
|
||||
- name: Cache build artifacts
|
||||
uses: Swatinem/rust-cache@v2
|
||||
- name: cargo build
|
||||
run: cargo build --all-targets
|
||||
- name: cargo test
|
||||
run: cargo test --all-targets
|
||||
Loading…
Add table
Add a link
Reference in a new issue