forgejo -> woodpecker

This commit is contained in:
Adam Stephens 2024-05-14 16:14:22 -04:00
parent ebffb583a3
commit e2ed1ccd08
No known key found for this signature in database
4 changed files with 47 additions and 32 deletions

View file

@ -1,29 +0,0 @@
on:
pull_request:
push:
jobs:
kernel:
runs-on: local/aarch64-linux
steps:
- uses: actions/checkout@v4
- name: set home
run: |
echo "HOME=$PWD" >> "$GITHUB_ENV"
- name: build all
run: |
set -x
TARGETS=$(nix eval .#packages.aarch64-linux --apply 'builtins.attrNames' --json | jq '. | map(".#" + .) | join(" ")' -r)
OUTPUT=$(nix build --print-out-paths --keep-going $TARGETS)
echo $OUTPUT
echo "$OUTPUT" > build.out
- name: upload to cachix
run: |
cachix push nixos-x13s $(cat build.out)
env:
CACHIX_AUTH_TOKEN: '${{ secrets.CACHIX_TOKEN_X13S }}'

25
.woodpecker/build.yaml Normal file
View file

@ -0,0 +1,25 @@
labels:
type: local
system: aarch64-linux
steps:
- name: find-targets
image: bash
commands:
- nix develop .#ci -c just -- find-targets
- name: build
image: bash
commands:
- nix develop .#ci -c just -- build
- name: upload
image: bash
commands:
- nix develop .#ci -c just -- push
environment:
CACHIX_AUTH_TOKEN:
from_secret: CACHIX_AUTH_TOKEN
when:
- event: push

View file

@ -20,9 +20,16 @@
perSystem =
{ pkgs, ... }:
{
devShells = {
default = pkgs.mkShellNoCC { packages = [ pkgs.npins ]; };
ci = pkgs.mkShellNoCC { packages = [ pkgs.cachix ]; };
devShells = rec {
default = pkgs.mkShellNoCC { packages = [ pkgs.npins ] ++ ci.nativeBuildInputs; };
ci = pkgs.mkShellNoCC {
packages = [
pkgs.cachix
pkgs.jq
pkgs.just
];
};
};
packages = {

12
justfile Normal file
View file

@ -0,0 +1,12 @@
all:
just -l
find-targets:
nix eval .#packages.aarch64-linux --apply 'builtins.attrNames' --json | jq '. | map(".#" + .) | join(" ")' -r > targets
build:
nix build --print-out-paths --keep-going $(cat targets) > outputs
cat outputs
push:
cachix -- push nixos-x13s $(cat outputs)