Github workflow
This commit is contained in:
parent
878db06495
commit
1c66a7e4a4
1 changed files with 56 additions and 0 deletions
56
.github/workflows/build.yml
vendored
Normal file
56
.github/workflows/build.yml
vendored
Normal file
|
@ -0,0 +1,56 @@
|
|||
name: Build
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
pull_request:
|
||||
types:
|
||||
- opened
|
||||
branches:
|
||||
- master
|
||||
|
||||
env:
|
||||
CARGO_TERM_COLOR: always
|
||||
PACWRAP_SCHEMA_BUILT: 1
|
||||
PACWRAP_CI: 1
|
||||
|
||||
jobs:
|
||||
checkfmt:
|
||||
name: Check format
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- nightly
|
||||
steps:
|
||||
- name: Install packages
|
||||
run: pacman -Syu git nodejs rustup --noconfirm
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v4
|
||||
- name: Install toolchain
|
||||
run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }}
|
||||
- name: Check format
|
||||
run: cargo fmt --check
|
||||
build:
|
||||
name: Build pacwrap
|
||||
runs-on: ubuntu-latest
|
||||
container:
|
||||
image: archlinux
|
||||
strategy:
|
||||
matrix:
|
||||
toolchain:
|
||||
- stable
|
||||
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: Build pacwrap
|
||||
run: ./dist/tools/prepare.sh release && cargo build --release && ./dist/tools/package.sh release
|
||||
- name: Lint pacwrap
|
||||
run: cargo clippy --release -- -Dwarnings
|
Loading…
Reference in a new issue