diff --git a/.gitea/workflows/build-and-test.yml b/.gitea/workflows/build-and-test.yml new file mode 100644 index 0000000..8a60c2e --- /dev/null +++ b/.gitea/workflows/build-and-test.yml @@ -0,0 +1,63 @@ +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: | + show-trace = true + max-jobs = auto + trusted-users = root + experimental-features = nix-command flakes + build-users-group = + + - name: Build + run: nix build .#tamerye-shared-library -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: | + show-trace = true + max-jobs = auto + trusted-users = root + experimental-features = nix-command flakes + build-users-group = + + - name: Build + run: nix build .#tamerye-static-library -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