From 90bbb51e5912366390eddb0d32b868ebda57360a Mon Sep 17 00:00:00 2001 From: Sasha Bogicevic Date: Tue, 28 Nov 2023 22:07:05 +0100 Subject: [PATCH] Try out magic-nix-cache --- .github/workflows/static-builds.yml | 59 +++++++++++++++++------------ 1 file changed, 35 insertions(+), 24 deletions(-) diff --git a/.github/workflows/static-builds.yml b/.github/workflows/static-builds.yml index e13ad77..66a55db 100644 --- a/.github/workflows/static-builds.yml +++ b/.github/workflows/static-builds.yml @@ -9,28 +9,39 @@ on: - "*.*.*" jobs: - build-executables: - name: "Build static executables" - runs-on: ubuntu-latest + build: steps: - - name: 📥 Checkout repository - uses: actions/checkout@v4 - - - name: ❄ Prepare nix - uses: cachix/install-nix-action@v23 - with: - extra_nix_config: | - accept-flake-config = true - log-lines = 1000 - - - name: ❄ Build static executables - run: | - mkdir -p bin/ - nix build .#easy-rider-static && cp result/bin/* bin/ - - - name: 💾 Upload executables - uses: actions/upload-artifact@v3 - with: - name: hydra-x86_64-unknown-linux-musl - path: | - ./bin + - uses: actions/checkout@v3 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@v4 + - name: Run the Magic Nix Cache + uses: DeterminateSystems/magic-nix-cache-action@v2 + - name: Build server and client + run: | + nix build .#easy-rider-static && cp result/bin/* bin/ +# jobs: +# build-executables: +# name: "build static executables" +# runs-on: ubuntu-latest +# steps: +# - name: 📥 checkout repository +# uses: actions/checkout@v4 +# +# - name: ❄ prepare nix +# uses: cachix/install-nix-action@v23 +# with: +# extra_nix_config: | +# accept-flake-config = true +# log-lines = 1000 +# +# - name: ❄ build static executables +# run: | +# mkdir -p bin/ +# nix build .#easy-rider-static && cp result/bin/* bin/ +# +# - name: 💾 upload executables +# uses: actions/upload-artifact@v3 +# with: +# name: hydra-x86_64-unknown-linux-musl +# path: | +# ./bin