dash/.github/workflows/guix-build.yml

136 lines
4.9 KiB
YAML
Raw Permalink Normal View History

name: Guix Build
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
permissions:
packages: write
id-token: write
attestations: write
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
on:
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
pull_request_target:
push:
jobs:
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
build-image:
runs-on: ubuntu-latest
outputs:
image-tag: ${{ steps.prepare.outputs.image-tag }}
repo-name: ${{ steps.prepare.outputs.repo-name }}
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: dash
feat: Set client version for non-release binaries and version in guix based on git tags (#5653) ## Issue being fixed or feature implemented Client version string is inconsistent. Building `v20.0.0-beta.8` tag locally produces binaries that report `v20.0.0-beta.8` version but binaries built in guix would report `v20.0.0rc1-g3e732a952226a20505f907e4fd9b3fdbb14ea5ee` instead. Building any commit after `v20.0.0-beta.8` locally would result in versions like `v20.0.0rc1-8c94153d2497` which is close but it's still yet another format. And both versions with `rc1` in their names are confusing cause you'd expect them to mention `beta.8` instead maybe (or is it just me? :D ). ## What was done? Change it so that the version string would look like this: on tag: ~`v20.0.0-beta.8-dev` or `v20.0.0-beta.8-gitarc`~ `v20.0.0-beta.8` post-tag: ~`v20.0.0-beta.8-1-gb837e08164-gitarc`~ `v20.0.0-beta.8-1-gb837e08164` post-tag format is `recent tag`-`commits since that tag`-`g+12 chars of commit hash`-`dirty (optional)` ~-`dev or gitarc`~ ~`dev`/`gitarc` suffixes should help avoiding confusion with the release versions and they also indicate the way non-release binaries were built.~ Note that release binaries do not use any of this, they still use `PACKAGE_VERSION` from `configure` like before. Also, `CLIENT_VERSION_RC` is no longer used in this setup so it was removed. Few things aren't clear to me yet: 1. Version bump in `configure.ac` no longer affects the reported version (unless it's an actual release). Are there any downsides I might be missing? 2. Which tag should we use on `develop` once we bump version in configure? `v21.0.0-init`? `v21.0.0-alpha1`? 3. How is it going to behave once `merge master back into develop` kind of PR is merged? E.g. say `develop` branch is on `v21.0.0-alpha1` tag and we merge v20.1.0 from `master` back into it. Will this bring `v20.1.0` release tag into `develop`? Will it become the one that will be used from that moment? If so we will probably need another tag on `develop` every time such PR is merged e.g. `v21.0.0-alpha2` (or whatever the next number is). Don't think these are blockers but would like to hear thoughts from others. ## How Has This Been Tested? Built binaries locally, built them using guix at a specific tag and at some commit on top of it. ## Breaking Changes n/a ## Checklist: - [x] I have performed a self-review of my own code - [x] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_
2024-01-12 04:43:42 +01:00
fetch-depth: 0
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Commit variables
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
id: prepare
run: |
echo "hash=$(sha256sum ./dash/contrib/containers/guix/Dockerfile | cut -d ' ' -f1)" >> $GITHUB_OUTPUT
echo "host_user_id=$(id -u)" >> $GITHUB_OUTPUT
echo "host_group_id=$(id -g)" >> $GITHUB_OUTPUT
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
BRANCH_NAME=$(echo "${GITHUB_REF##*/}" | tr '[:upper:]' '[:lower:]')
REPO_NAME=$(echo "${{ github.repository }}" | tr '[:upper:]' '[:lower:]')
echo "::set-output name=image-tag::${BRANCH_NAME}"
echo "::set-output name=repo-name::${REPO_NAME}"
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build Docker image
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
uses: docker/build-push-action@v6
with:
context: ${{ github.workspace }}/dash
build-args: |
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
USER_ID=${{ steps.prepare.outputs.host_user_id }}
GROUP_ID=${{ steps.prepare.outputs.host_group_id }}
build-contexts: |
docker_root=${{ github.workspace }}/dash/contrib/containers/guix
file: ./dash/contrib/containers/guix/Dockerfile
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
push: true
tags: |
ghcr.io/${{ steps.prepare.outputs.repo-name }}/dashcore-guix-builder:${{ steps.prepare.outputs.image-tag }}
ghcr.io/${{ steps.prepare.outputs.repo-name }}/dashcore-guix-builder:latest
cache-from: type=registry,ref=ghcr.io/${{ steps.prepare.outputs.repo-name }}/dashcore-guix-builder:latest
cache-to: type=inline,mode=max
build:
needs: build-image
# runs-on: [ "self-hosted", "linux", "x64", "ubuntu-core" ]
runs-on: ubuntu-latest
# if: ${{ contains(github.event.pull_request.labels.*.name, 'guix-build') }}
strategy:
matrix:
build_target: [x86_64-linux-gnu, arm-linux-gnueabihf, aarch64-linux-gnu, riscv64-linux-gnu, x86_64-w64-mingw32, x86_64-apple-darwin, arm64-apple-darwin]
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
timeout-minutes: 480
steps:
- name: Checkout
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
path: dash
fetch-depth: 0
- name: Cache Guix and depends
id: guix-cache-restore
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
uses: actions/cache@v3
with:
path: |
${{ github.workspace }}/.cache
${{ github.workspace }}/dash/depends/built
${{ github.workspace }}/dash/depends/sources
${{ github.workspace }}/dash/depends/work
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
/gnu/store
key: ${{ runner.os }}-guix-${{ matrix.build_target }}-${{ github.sha }}
restore-keys: |
${{ runner.os }}-guix-${{ matrix.build_target }}
${{ runner.os }}-guix-
- name: Create .cache folder if missing
if: steps.guix-cache-restore.outputs.cache-hit != 'true'
run: mkdir -p .cache
- name: Run Guix build
timeout-minutes: 480
run: |
docker run --privileged -d --rm -t \
--name guix-daemon \
-e ADDITIONAL_GUIX_COMMON_FLAGS="--max-jobs=$(nproc --all)" \
-v ${{ github.workspace }}/dash:/src/dash \
-v ${{ github.workspace }}/.cache:/home/ubuntu/.cache \
-w /src/dash \
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
ghcr.io/${{ needs.build-image.outputs.repo-name }}/dashcore-guix-builder:${{ needs.build-image.outputs.image-tag }} && \
docker exec guix-daemon bash -c 'HOSTS=${{ matrix.build_target }} /usr/local/bin/guix-start'
- name: Ensure build passes
run: |
if [[ $? != 0 ]]; then
echo "Guix build failed!"
exit 1
fi
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
- name: Compute SHA256 checksums
continue-on-error: true # It will complain on depending on only some hosts
run: |
HOSTS=${{ matrix.build_target }} ./dash/contrib/containers/guix/scripts/guix-check ${{ github.workspace }}/dash
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
name: guix-artifacts-${{ matrix.build_target }}
path: |
Merge #6197: ci: always build guix, save artifacts 770651aa157c2412b96e38fd8ee56a33e8c292bc set hosts in guix-check (pasta) 580bbe6d1c3d4b6229d20e69978e5eeebac845a5 feat: improve guix building; run always, save artifacts (pasta) 101a31555fbe039113c55ec641ec9f1d4121abf2 refactor: simplify caching setup, add a restore key to actually cache besides 1 run (pasta) 1b139e4837b9bc3167028def245522df75f18ae3 feat: automatically run guix-build on all tags pushed (pasta) Pull request description: ## Issue being fixed or feature implemented Previously, we only ran guix on 1 machine for all hosts; this slowed it down a lot. Let's move to GitHub action runners, but run them all separately. Then upload the artifacts. In the future there is significant caching I can add that should help a lot more. But currently, takes about 1 hour ## What was done? ## How Has This Been Tested? see: https://github.com/PastaPastaPasta/dash/actions/runs/10345024600 ## Breaking Changes None ## Checklist: _Go over all the following points, and put an `x` in all the boxes that apply._ - [x] I have performed a self-review of my own code - [ ] I have commented my code, particularly in hard-to-understand areas - [ ] I have added or updated relevant unit/integration/functional/e2e tests - [ ] I have made corresponding changes to the documentation - [x] I have assigned this pull request to a milestone _(for repository code-owners and collaborators only)_ ACKs for top commit: UdjinM6: utACK 770651aa157c2412b96e38fd8ee56a33e8c292bc Tree-SHA512: 639b95c3b6a26f205ed00c138a9189f915cfc36a815516035e59ceda82675414b1bd31a361b33449b5e4c58a7655f3a7d616b362c23f7fa75e72b1284be06b9e
2024-08-12 12:25:30 +02:00
${{ github.workspace }}/dash/guix-build*/output/${{ matrix.build_target }}/
- name: Attest build provenance
uses: actions/attest-build-provenance@v1
with:
subject-path: ${{ github.workspace }}/dash/guix-build*/output/${{ matrix.build_target }}/*