73 lines
1.7 KiB
YAML
73 lines
1.7 KiB
YAML
name: "Build and test"
|
|
on:
|
|
workflow_dispatch:
|
|
pull_request:
|
|
push:
|
|
jobs:
|
|
build-shared-library:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get update && apt-get -y install sudo
|
|
|
|
- name: Install nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
with:
|
|
extra_nix_config: |
|
|
sandbox = false
|
|
|
|
- name: Build
|
|
run: nix build .#tamerye-shared-lib -L
|
|
|
|
- name: Upload database as artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: tamerye-shared-library-${{ gitea.sha }}.zip
|
|
path: result/
|
|
if-no-files-found: error
|
|
retention-days: 15
|
|
|
|
build-static-library:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get update && apt-get -y install sudo
|
|
|
|
- name: Install nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
with:
|
|
extra_nix_config: |
|
|
sandbox = false
|
|
|
|
- name: Build
|
|
run: nix build .#tamerye-static-lib -L
|
|
|
|
- name: Upload database as artifact
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: tamerye-static-library-${{ gitea.sha }}.zip
|
|
path: result/
|
|
if-no-files-found: error
|
|
retention-days: 15
|
|
|
|
test:
|
|
runs-on: debian-latest
|
|
steps:
|
|
- uses: actions/checkout@v6
|
|
|
|
- name: Install sudo
|
|
run: apt-get update && apt-get -y install sudo
|
|
|
|
- name: Install nix
|
|
uses: https://github.com/cachix/install-nix-action@v31
|
|
with:
|
|
extra_nix_config: |
|
|
sandbox = false
|
|
|
|
- name: Build
|
|
run: nix build .#tamerye-tests -L
|