Separate lint job
- Separate Build and Lint jobs for better clarity - Fixed PACWRAP_SCHEMA_BUILT envvar check in pacwrap build script
This commit is contained in:
parent
80c6042c3b
commit
660ab2b910
3 changed files with 45 additions and 5 deletions
|
@ -30,6 +30,28 @@ jobs:
|
|||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Check format
|
||||
run: cargo fmt --check
|
||||
lint:
|
||||
name: Lint pacwrap
|
||||
runs-on: docker
|
||||
container:
|
||||
image: archlinux
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
env:
|
||||
PACWRAP_SCHEMA_BUILT: 0
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: pacman -Syu base-devel bubblewrap busybox fakechroot fakeroot git nodejs rustup --noconfirm
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Set up environment
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Lint pacwrap
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
build:
|
||||
name: Build pacwrap
|
||||
runs-on: docker
|
||||
|
@ -50,5 +72,3 @@ jobs:
|
|||
run: git config --global --add safe.directory '*'
|
||||
- name: Build pacwrap
|
||||
run: ./dist/tools/prepare.sh release && cargo build --release && ./dist/tools/package.sh release
|
||||
- name: Lint pacwrap
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
|
|
24
.github/workflows/build.yml
vendored
24
.github/workflows/build.yml
vendored
|
@ -34,6 +34,28 @@ jobs:
|
|||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Check format
|
||||
run: cargo fmt --check
|
||||
lint:
|
||||
name: Lint pacwrap
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
env:
|
||||
PACWRAP_SCHEMA_BUILT: 0
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: pacman -Syu base-devel bubblewrap busybox fakechroot fakeroot git nodejs rustup --noconfirm
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Set up environment
|
||||
run: git config --global --add safe.directory '*'
|
||||
- name: Lint pacwrap
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
build:
|
||||
name: Build pacwrap
|
||||
runs-on: ubuntu-latest
|
||||
|
@ -54,5 +76,3 @@ jobs:
|
|||
run: git config --global --add safe.directory '*'
|
||||
- name: Build pacwrap
|
||||
run: ./dist/tools/prepare.sh release && cargo build --release && ./dist/tools/package.sh release
|
||||
- name: Lint pacwrap
|
||||
run: cargo clippy --release -- -Dwarnings
|
||||
|
|
|
@ -73,7 +73,7 @@ fn is_debug() -> bool {
|
|||
}
|
||||
|
||||
fn main() {
|
||||
let built = var("PACWRAP_SCHEMA_BUILT").is_ok();
|
||||
let built = var("PACWRAP_SCHEMA_BUILT").is_ok_and(|s| s.parse().unwrap_or(false));
|
||||
|
||||
if !cfg!(target_os = "linux") || !cfg!(target_family = "unix") {
|
||||
panic!("Unsupported build target. Please refer to the build documentation for further information.")
|
||||
|
|
Loading…
Add table
Reference in a new issue