aboutsummaryrefslogtreecommitdiffhomepage
path: root/.gitea/workflows
diff options
context:
space:
mode:
Diffstat (limited to '.gitea/workflows')
-rw-r--r--.gitea/workflows/release.yml25
-rw-r--r--.gitea/workflows/test.yml130
2 files changed, 2 insertions, 153 deletions
diff --git a/.gitea/workflows/release.yml b/.gitea/workflows/release.yml
index 134d8bd1..d4eb0de8 100644
--- a/.gitea/workflows/release.yml
+++ b/.gitea/workflows/release.yml
@@ -1,24 +1 @@
-name: Release
-
-on:
- push:
- tags:
- - 'v*'
-
-jobs:
- release:
- name: Create release
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Build for release
- run: nix build --print-out-paths --print-build-logs ./test#dist
-
- - name: Release
- uses: https://gitea.com/actions/release-action@main
- with:
- files: |-
- result/hakurei-**
- api_key: '${{secrets.RELEASE_TOKEN}}'
+{"name":"Release","on":[{"K":"push","V":[{"K":"tags","V":"v*"}]}],"jobs":{"release":{"name":"Create release","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Build for release","run":"nix build --print-out-paths --print-build-logs ./test#dist"},{"name":"Release","uses":"https://gitea.com/actions/release-action@main","with":{"files":"result/hakurei-**","api_key":"${{secrets.RELEASE_TOKEN}}"}}]}}}
diff --git a/.gitea/workflows/test.yml b/.gitea/workflows/test.yml
index d1fc7ef8..0c29eb9e 100644
--- a/.gitea/workflows/test.yml
+++ b/.gitea/workflows/test.yml
@@ -1,129 +1 @@
-name: Test
-
-on:
- - push
-
-jobs:
- hakurei:
- name: Hakurei
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.hakurei
-
- - name: Upload test output
- uses: actions/upload-artifact@v3
- with:
- name: "hakurei-vm-output"
- path: result/*
- retention-days: 1
-
- race:
- name: Hakurei (race detector)
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.race
-
- - name: Upload test output
- uses: actions/upload-artifact@v3
- with:
- name: "hakurei-race-vm-output"
- path: result/*
- retention-days: 1
-
- sandbox:
- name: Sandbox
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox
-
- - name: Upload test output
- uses: actions/upload-artifact@v3
- with:
- name: "sandbox-vm-output"
- path: result/*
- retention-days: 1
-
- sandbox-race:
- name: Sandbox (race detector)
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox-race
-
- - name: Upload test output
- uses: actions/upload-artifact@v3
- with:
- name: "sandbox-race-vm-output"
- path: result/*
- retention-days: 1
-
- sharefs:
- name: ShareFS
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run NixOS test
- run: nix build --out-link "result" --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sharefs
-
- - name: Upload test output
- uses: actions/upload-artifact@v3
- with:
- name: "sharefs-vm-output"
- path: result/*
- retention-days: 1
-
- check:
- name: Flake checks
- needs:
- - hakurei
- - race
- - sandbox
- - sandbox-race
- - sharefs
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Run checks
- run: nix --print-build-logs --experimental-features 'nix-command flakes' flake check ./test
-
- dist:
- name: Create distribution
- runs-on: nix
- steps:
- - name: Checkout
- uses: actions/checkout@v4
-
- - name: Build for test
- id: build-test
- run: >-
- export HAKUREI_REV="$(git rev-parse --short HEAD)" &&
- sed -i.old 's/version = /version = "0.0.0-'$HAKUREI_REV'"; # version = /' test/package.nix &&
- nix build --print-out-paths --print-build-logs ./test#dist &&
- mv test/{package.nix.old,package.nix} &&
- echo "rev=$HAKUREI_REV" >> $GITHUB_OUTPUT
-
- - name: Upload test build
- uses: actions/upload-artifact@v3
- with:
- name: "hakurei-${{ steps.build-test.outputs.rev }}"
- path: result/*
- retention-days: 1
+{"name":"Test","on":["push"],"jobs":{"hakurei":{"name":"Hakurei","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test#checks.x86_64-linux.hakurei"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-vm-output","path":"result/*","retention-days":1}}]},"race":{"name":"Hakurei (race detector)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test#checks.x86_64-linux.race"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-race-vm-output","path":"result/*","retention-days":1}}]},"sandbox":{"name":"Sandbox","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"sandbox-vm-output","path":"result/*","retention-days":1}}]},"sandbox-race":{"name":"Sandbox (race detector)","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sandbox-race"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"sandbox-race-vm-output","path":"result/*","retention-days":1}}]},"sharefs":{"name":"ShareFS","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run NixOS test","run":"nix build --out-link result --print-out-paths --print-build-logs ./test#checks.x86_64-linux.sharefs"},{"name":"Upload test output","uses":"actions/upload-artifact@v3","with":{"name":"sharefs-vm-output","path":"result/*","retention-days":1}}]},"check":{"name":"Flake checks","needs":["hakurei","race","sandbox","sandbox-race","sharefs"],"runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Run checks","run":"nix --print-build-logs --experimental-features 'nix-command flakes' flake check ./test"}]},"dist":{"name":"Create distribution","runs-on":"nix","steps":[{"name":"Checkout","uses":"actions/checkout@v4"},{"name":"Build for test","id":"build-test","run":"export HAKUREI_REV=\"$(git rev-parse --short HEAD)\" \u0026\u0026 sed -i.old 's/version = /version = \"0.0.0-'$HAKUREI_REV'\"; # version = /' test/package.nix \u0026\u0026 nix build --print-out-paths --print-build-logs ./test#dist \u0026\u0026 mv test/{package.nix.old,package.nix} \u0026\u0026 echo \"rev=$HAKUREI_REV\" \u003e\u003e $GITHUB_OUTPUT"},{"name":"Upload test build","uses":"actions/upload-artifact@v3","with":{"name":"hakurei-${{ steps.build-test.outputs.rev }}","path":"result/*","retention-days":1}}]}}}