64 lines
1.6 KiB
YAML
64 lines
1.6 KiB
YAML
|
|
name: "Build and test"
|
|
run-name: "Build and test"
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
env:
|
|
BINSTALL_DISABLE_TELEMETRY: 'true'
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get install --update --assume-yes sudo
|
|
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
|
|
- name: Build project
|
|
run: nix build .#wamf -L
|
|
|
|
build-freebsd-cross:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get install --update --assume-yes sudo
|
|
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
|
|
- name: Build project for FreeBSD
|
|
run: nix build .#wamf-freebsd-cross -L
|
|
|
|
test:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get install --update --assume-yes sudo
|
|
|
|
- name: Install Nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
|
|
- name: Test and build coverage report
|
|
run: nix build .#coverage-html -L
|
|
|
|
- name: Upload coverage report
|
|
uses: https://git.pvv.ntnu.no/Projects/rsync-action@v1
|
|
with:
|
|
source: result/
|
|
target: ${{ gitea.ref_name }}/coverage/
|
|
username: gitea-web
|
|
ssh-key: ${{ secrets.WEB_SYNC_SSH_KEY }}
|
|
host: pages.pvv.ntnu.no
|
|
args: "--archive --compress --verbose --mkpath --delete --checksum"
|
|
known-hosts: "pages.pvv.ntnu.no ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIH2QjfFB+city1SYqltkVqWACfo1j37k+oQQfj13mtgg"
|