add forgejo action

This commit is contained in:
🪞👃🪞 2025-03-10 15:04:44 +02:00
parent 23adab3804
commit 70984b4992
3 changed files with 29 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{pkgs?import<nixpkgs>{}}:let
stdenv = pkgs.clang19Stdenv;
name = "tengri";
nativeBuildInputs = with pkgs; [ grcov time rustup cloc just pkg-config libclang ];
buildInputs = with pkgs; [ libclang ];
LIBCLANG_PATH = "${pkgs.libclang.lib.outPath}/lib";
LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath (with pkgs; []);
in pkgs.mkShell.override {
inherit stdenv;
} {
inherit name nativeBuildInputs buildInputs LIBCLANG_PATH LD_LIBRARY_PATH;
}

View file

@ -0,0 +1,15 @@
on: [push]
jobs:
build:
container:
image: nixos/nix:latest
steps:
- run: nix-channel --list && nix-channel --update
- run: nix-shell --cores 4 -p git --command 'git clone --recursive $GITHUB_SERVER_URL/$GITHUB_REPOSITORY .'
- run: whoami && pwd && ls -al
- run: nix-shell --cores 4 --command 'cloc src/ && cloc .' .forgejo/workflows/build.nix
- run: nix-shell --cores 4 --command 'rustup install nightly && cargo version -vv' .forgejo/workflows/build.nix
- run: nix-shell --cores 4 --command 'just cov-md' .forgejo/workflows/build.nix
- run: nix-shell --cores 4 --command 'just doc' .forgejo/workflows/build.nix
#- run: nix-shell --cores 4 --command 'just build-release' .forgejo/workflows/build.nix
#- run: nix-shell -p docker --command "docker run --security-opt seccomp=unconfined -v $PWD:/volume xd009642/tarpaulin cargo tarpaulin --out Html --all-features"

View file

@ -8,3 +8,5 @@ cov:
cov-md: cov-md:
{{covfig}} time cargo test -j4 --workspace --exclude jack --profile coverage {{covfig}} time cargo test -j4 --workspace --exclude jack --profile coverage
{{covfig}} time grcov . -s . {{grcov-binary}} {{grcov-ignore}} -t markdown | sort {{covfig}} time grcov . -s . {{grcov-binary}} {{grcov-ignore}} -t markdown | sort
doc:
cargo doc