ci: upgrade to Ubuntu 22 and actions v4 #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build | |
on: | |
push: | |
pull_request: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
sudo apt-get install -y --no-install-recommends clang-format-11 libboost-dev libboost-program-options-dev | |
- name: Check code style | |
run: | | |
make lint | |
git diff --exit-code | |
- name: Build and install | |
run: | | |
make | |
sudo make install | |
sudo make uninstall | |
debian: | |
runs-on: ubuntu-22.04 | |
container: debian:bookworm | |
steps: | |
- name: Install tools | |
run: | | |
apt-get update | |
apt-get install -qq --no-install-recommends devscripts equivs gawk git | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
mk-build-deps -ir -t "apt-get -qq --no-install-recommends" | |
- name: Prepare changelog | |
run: | | |
debian/nightly-changelog.sh | |
env: | |
DISTRO: bookworm | |
- name: Build package | |
run: | | |
debuild -us -uc | |
mv ../*.deb ~/ | |
- uses: actions/upload-artifact@v4 | |
with: | |
name: deb | |
path: ~/*.deb |