Skip to content

feat(efiboot): make efiboot boot add add the entry to boot order #335

feat(efiboot): make efiboot boot add add the entry to boot order

feat(efiboot): make efiboot boot add add the entry to boot order #335

Workflow file for this run

name: build
on:
pull_request:
branches-ignore:
- renovate/*
push:
branches:
- main
- alpha
- beta
- test
- renovate/*
tags-ignore:
- "**"
jobs:
check:
runs-on: ubuntu-latest
env:
RUSTFLAGS: "-D warnings"
RUSTDOCFLAGS: "-D warnings"
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: check-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# Calling rustup show will install the toolchain in rust-toolchain
- name: Install toolchain
id: rustup
run: rustup show
- name: Fetch dependencies
run: cargo fetch
- name: Run cargo fmt
run: cargo fmt -- --check
- name: Run cargo check
run: cargo check --all-features
- name: Run cargo clippy
run: cargo clippy --all-features
- name: Run cargo doc
run: cargo doc --all-features --no-deps
test:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runs-on: windows-latest
target: x86_64-pc-windows-msvc
needs:
- check
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: test-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# Calling rustup show will install the toolchain in rust-toolchain
- name: Install toolchain
id: rustup
run: rustup show
# Install cargo-make which will drive the build
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
with:
version: 0.36.2
- name: Fetch dependencies
run: cargo fetch
# Run tests
- name: Run tests
shell: bash
run: |
if cargo make --list-all-steps --output-format autocomplete --quiet | grep -E '(^|\W)ci-test($|\W)' >/dev/null 2>&1; then
cargo make ci-test
else
echo "No test task found in Makefile.toml."
fi
- name: Upload coverage to codecov.io
uses: codecov/codecov-action@v3
with:
files: coverage/info.lcov
fail_ci_if_error: false # upload can randomly fail, see https://github.com/codecov/codecov-action/issues/557
token: ${{ secrets.CODECOV_TOKEN }}
verbose: true
build:
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
include:
- runs-on: ubuntu-latest
target: x86_64-unknown-linux-gnu
- runs-on: windows-latest
target: x86_64-pc-windows-msvc
needs:
- check
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Cargo cache
uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
key: build-${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Setup Rust cache
uses: actions/cache@v3
with:
path: |
target/
key: build-${{ runner.os }}-rust-${{ hashFiles('**/Cargo.lock') }}
# Calling rustup show will install the toolchain in rust-toolchain
- name: Install toolchain
id: rustup
run: rustup show
# Install cargo-make which will drive the build
- name: Install cargo-make
uses: davidB/rust-cargo-make@v1
with:
version: 0.36.2
- name: Fetch dependencies
run: cargo fetch
# Run binary build
- name: Build binaries
run: cargo make ci-build
# Upload artifacts
- name: Upload binaries from dist/
uses: actions/upload-artifact@v3
with:
name: Artifact
path: dist/