diff options
| author | Jules Aguillon | 2022-03-23 10:23:13 +0100 |
|---|---|---|
| committer | Jules Aguillon | 2022-03-23 13:02:38 +0100 |
| commit | 3373c59b903cfcccedf31278f9f18ea305e3a567 (patch) | |
| tree | d55fe718e99ed07f48a5142cb3d8574edea40d86 /.github/workflows/make-apk.yml | |
| parent | 0d1ddcce3f92e029a75af285927fe1ef89bb2a26 (diff) | |
| download | unexpected-keyboard-3373c59b903cfcccedf31278f9f18ea305e3a567.tar.gz unexpected-keyboard-3373c59b903cfcccedf31278f9f18ea305e3a567.zip | |
CI: Use nixbuild.net
The build takes place on the remote, which takes advantage of Nix's
caching.
The previous workflow used a remote cache but in order to build locally,
all the dependencies needed to be downloaded from the cache everytime.
The dependencies are 462M, downloading took most of the time.
Diffstat (limited to '.github/workflows/make-apk.yml')
| -rw-r--r-- | .github/workflows/make-apk.yml | 29 |
1 files changed, 18 insertions, 11 deletions
diff --git a/.github/workflows/make-apk.yml b/.github/workflows/make-apk.yml index 2fe3534..b82926b 100644 --- a/.github/workflows/make-apk.yml +++ b/.github/workflows/make-apk.yml @@ -1,4 +1,4 @@ -name: Make Apk CI +name: Build-debug-apk on: workflow_dispatch: @@ -6,29 +6,36 @@ on: pull_request: jobs: - Build-Apk: + Make-apk: runs-on: ubuntu-latest steps: - name: Install nix uses: cachix/install-nix-action@v15 with: nix_path: nixpkgs=channel:nixos-unstable - - uses: cachix/cachix-action@v10 + - name: Setup nixbuild.net + uses: nixbuild/nixbuild-action@v8 with: - name: julow - signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}' - - name: Checkout Repo + nixbuild_ssh_key: ${{ secrets.nixbuild_ssh_key }} + - name: Checkout repo uses: actions/checkout@v2 - name: Cache debug certificate uses: actions/cache@v2 with: path: _build/debug.keystore key: debug-keystore - - name: Run nix-shell and Make - uses: ZenithalHourlyRate/nix-shell-action@v4 - with: - file: shell.nix - script: make + # Hopefully cached. + - name: Debug certificate + run: | + [[ -f _build/debug.keystore ]] || + nix-shell ./shell.nix --run 'make debug.keystore' + - name: Build + run: | + nix build --eval-store auto --store ssh-ng://eu.nixbuild.net \ + -f ./shell.nix debug-apk + nix build -f ./shell.nix debug-apk + mkdir -p _build + cp result/*.apk _build - name: Save debug apk uses: actions/upload-artifact@v2 with: |
