Skip to content

Commit

Permalink
Run build on github and use cachix
Browse files Browse the repository at this point in the history
  • Loading branch information
jsvapiav committed Mar 19, 2024
1 parent 12533c2 commit 6078573
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 5 deletions.
6 changes: 6 additions & 0 deletions .github/actions/build-n-upload-action/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,12 @@ echo "pwd=$GITHUB_WORKSPACE" >> $GITHUB_OUTPUT

cd $GITHUB_WORKSPACE

echo "Install cachix"
nix-env -iA cachix -f https://cachix.org/api/v1/install
echo "Using cachix version:"
cachix --version

echo "Build $BUILD_TARGET"
nix flake show
nix build --accept-flake-config .#$BUILD_TARGET

Expand Down
4 changes: 2 additions & 2 deletions .github/actions/build-n-upload-action/install_nix.sh
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ add_config "extra-nix-path = nixpkgs=flake:nixpkgs"
add_config "trusted-users = root ${USER-}"

# Add default NixOS binary cache
add_config "substituters = https://cache.nixos.org/"
add_config "substituters = https://cache.nixos.org/ https://fmo-os.cachix.org?priority=20 https://cache.vedenemo.dev"
add_config "trusted-substituters = https://cache.nixos.org/"
add_config "trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
add_config "trusted-public-keys = cache.vedenemo.dev:8NhplARANhClUSWJyLVk4WMyy1Wb4rhmWW2u8AejH9E= cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= fmo-os.cachix.org-1:DgLQ+vA+K4o50bLUWih3Vkr5S0EO7XVrWRAILZ2/LH8="
add_config "substitute = true"

# Optimize store disk usage
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,9 +17,10 @@ permissions:
contents: read

jobs:
hello_world_job:
runs-on: [self-hosted, nixbuilder]
name: A job to say hello
build_target:
runs-on: ubuntu-latest
timeout-minutes: 360
name: Build FMO-OS
steps:
# To use this repository's private action,
# you must check out the repository
Expand Down

0 comments on commit 6078573

Please sign in to comment.