Since the Arch Linux OCI image can sometimes be out-of-sync, update the keyring and base packages prior to installing the requisite packages. This will hopefully ensure a cached container image can no longer trigger a pipeline failure.
80 lines
2.3 KiB
YAML
80 lines
2.3 KiB
YAML
name: Build
|
|
|
|
on:
|
|
workflow_dispatch:
|
|
push:
|
|
branches:
|
|
- master
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
PACWRAP_SCHEMA_BUILT: 1
|
|
PACWRAP_CI: 1
|
|
|
|
jobs:
|
|
checkfmt:
|
|
name: Check format
|
|
runs-on: docker
|
|
container:
|
|
image: archlinux
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- nightly
|
|
steps:
|
|
- name: Update container
|
|
run: pacman -Sy archlinux-keyring --noconfirm --needed && pacman -Su --noconfirm
|
|
- name: Install packages
|
|
run: pacman -S 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
|
|
lint:
|
|
name: Lint pacwrap
|
|
runs-on: docker
|
|
container:
|
|
image: archlinux
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
env:
|
|
PACWRAP_SCHEMA_BUILT: 0
|
|
steps:
|
|
- name: Update container
|
|
run: pacman -Sy archlinux-keyring --noconfirm --needed && pacman -Su --noconfirm
|
|
- name: Install packages
|
|
run: pacman -S base-devel 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
|
|
container:
|
|
image: archlinux
|
|
strategy:
|
|
matrix:
|
|
toolchain:
|
|
- stable
|
|
steps:
|
|
- name: Update container
|
|
run: pacman -Sy archlinux-keyring --noconfirm --needed && pacman -Su --noconfirm
|
|
- name: Install packages
|
|
run: pacman -S 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
|