ci: add initial workflows
Signed-off-by: Christoph Heiss <christoph@c8h4.io>
This commit is contained in:
parent
c09668cda6
commit
fc5dce95d1
2 changed files with 58 additions and 0 deletions
21
.forgejo/workflows/flake.yaml
Normal file
21
.forgejo/workflows/flake.yaml
Normal file
|
@ -0,0 +1,21 @@
|
|||
---
|
||||
name: flake
|
||||
|
||||
on:
|
||||
push:
|
||||
|
||||
env:
|
||||
NIX_CONFIG: 'experimental-features = nix-command flakes'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nixos-unstable
|
||||
steps:
|
||||
- name: prepare nix container
|
||||
run: nix-env -iA nixpkgs.nodejs
|
||||
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: run flake check
|
||||
run: nix flake check -L
|
37
.forgejo/workflows/nightly.yaml
Normal file
37
.forgejo/workflows/nightly.yaml
Normal file
|
@ -0,0 +1,37 @@
|
|||
---
|
||||
name: nightly build
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
|
||||
env:
|
||||
NIX_CONFIG: 'experimental-features = nix-command flakes'
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: nixos-unstable
|
||||
steps:
|
||||
- name: prepare nix container
|
||||
run: nix-env -iA nixpkgs.nodejs
|
||||
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: run flake check
|
||||
run: nix flake check -L
|
||||
|
||||
- name: build nightly binary
|
||||
run: nix build .#tiny-raytracer
|
||||
|
||||
- name: upload binary
|
||||
# v4 has a bug: https://github.com/go-gitea/gitea/issues/31354
|
||||
# use v3 until it is fixed
|
||||
uses: forgejo/upload-artifact@v3
|
||||
with:
|
||||
name: tiny-raytracer-nightly-${{ env.GITHUB_SHA }}
|
||||
path: result/bin/tiny-raytracer
|
||||
retention-days: 14
|
||||
if-no-files-found: error
|
||||
overwrite: true
|
Loading…
Reference in a new issue