From 843f325cf51359b4c0db8f524f6e965f1506f9fe Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:47:41 -0600 Subject: [PATCH 01/16] feat(ci): run on github arm --- .github/workflows/release-component.yml | 63 ++++++++++++++++--------- 1 file changed, 42 insertions(+), 21 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 8424da9d48..7804d41460 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -83,39 +83,59 @@ jobs: with: filter_builds: ${{ needs.eval-tag.outputs.build }} - download-images: + download-images-x86_64: if: ${{ needs.eval-tag.outputs.image-produced }} needs: [build, eval-tag] - runs-on: ubuntu-latest - strategy: - matrix: - system: ${{ fromJSON(needs.eval-tag.outputs.systems) }} + runs-on: ubuntu-24.04 steps: - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v4 with: - name: packages.${{ matrix.system }}.${{ needs.eval-tag.outputs.component }}-image + lfs: true - uses: nixbuild/nix-quick-install-action@v28 - - uses: nixbuild/nixbuild-action@812f1ab2b51842b0d44b9b79574611502d6940a0 with: - nixbuild_token: ${{ secrets.nixbuild_token }} - - env: + nix_conf: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= + trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org + - name: Fetch from Cache + env: COMPONENT: ${{ needs.eval-tag.outputs.component }} - SYSTEM: ${{ matrix.system }} run: | - mkdir "$SYSTEM" - nix copy --to "file://$(pwd)/$SYSTEM" --from ssh-ng://eu.nixbuild.net "$(cat result.json | jq -r \ - --arg component "$COMPONENT-image" \ - --arg system "$SYSTEM" \ - '.packages[$system][$component].outputs.out')" --extra-experimental-features nix-command - cat "$SYSTEM"/nar/*.nar.xz | xz -dc | nix-store --restore "$SYSTEM.$COMPONENT"-image + nix build .#packages.x86_64-linux."$COMPONENT" + cp -Lr result x86_64-linux.${{ needs.eval-tag.outputs.component }}-image + exit 1 - uses: actions/upload-artifact@v4 with: - name: ${{ matrix.system }}.${{ needs.eval-tag.outputs.component }}-image - path: ${{ matrix.system }}.${{ needs.eval-tag.outputs.component }}-image + name: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image + path: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image - download-binaries: + download-images-aarch64: + if: ${{ needs.eval-tag.outputs.image-produced }} needs: [build, eval-tag] - runs-on: ubuntu-latest + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: nixbuild/nix-quick-install-action@v28 + with: + nix_conf: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= + trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org + - name: Fetch from Cache + env: + COMPONENT: ${{ needs.eval-tag.outputs.component }} + run: | + nix build .#packages.aarch64-linux."$COMPONENT" + cp -Lr result aarch64-linux."$COMPONENT"-image + exit 1 + - uses: actions/upload-artifact@v4 + with: + name: aarch64-linux.${{ needs.eval-tag.outputs.component }}-image + path: aarch64-linux.${{ needs.eval-tag.outputs.component }}-image + + download-binaries-x86_64: + needs: [build, eval-tag] + runs-on: ubuntu-24.04 strategy: matrix: system: ${{ fromJSON(needs.eval-tag.outputs.systems) }} @@ -132,6 +152,7 @@ jobs: COMPONENT: ${{ needs.eval-tag.outputs.component }} SYSTEM: ${{ matrix.system }} run: | + exit 1 mkdir "$SYSTEM" echo "Getting OUTPUT and NARINFO_NAME" OUTPUT=$(jq -r \ From 5e6cab9e1232f12a6ad1f40805612c91d40e2775 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:47:53 -0600 Subject: [PATCH 02/16] chore(ci): test arm builds --- .github/workflows/release-component.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 7804d41460..edca845102 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -2,7 +2,7 @@ name: Release Component on: push: - tags: ['*/v[0-9]+\.[0-9]+\.[0-9]+\-rc[0-9]+', '*/v[0-9]+\.[0-9]+\.[0-9]+'] + # tags: ['*/v[0-9]+\.[0-9]+\.[0-9]+\-rc[0-9]+', '*/v[0-9]+\.[0-9]+\.[0-9]+'] jobs: eval-tag: @@ -17,12 +17,13 @@ jobs: steps: - id: eval env: - TAG: ${{github.ref_name}} + # TAG: ${{github.ref_name}} + TAG: bundle-testnet-9 run: | component="${TAG%/*}" case $component in - bundle-testnet-8) - attrs="[\"bundle-testnet-8\", \"bundle-testnet-8-image\"]" + bundle-testnet-9) + attrs="[\"bundle-testnet-9\", \"bundle-testnet-9-image\"]" systems="[\"x86_64-linux\", \"aarch64-linux\"]" echo "COMPONENT=$component" >> $GITHUB_OUTPUT echo "IMAGE_PRODUCED=true" >> $GITHUB_OUTPUT From d020905174f416745e9465287ca2fa95e9111ff4 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:55:52 -0600 Subject: [PATCH 03/16] fix(ci): update needs names --- .github/workflows/release-component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index edca845102..476da79e4b 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -187,7 +187,7 @@ jobs: path: ${{ needs.eval-tag.outputs.component }}-${{ matrix.system }} release-images: - needs: [download-images, eval-tag] + needs: [download-images-x86_64, eval-tag] if: ${{ needs.eval-tag.outputs.image-produced }} runs-on: ubuntu-latest permissions: @@ -279,7 +279,7 @@ jobs: echo "Copied $COMPONENT:$TAG multi-arch to GHCR" public-release: - needs: [download-binaries, eval-tag] + needs: [download-binaries-x86_64, eval-tag] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 From 6ba2a9aec21d4475bab5c5757341b4bed85364d6 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 13:59:34 -0600 Subject: [PATCH 04/16] fix(ci): remove nixbuild build step --- .github/workflows/release-component.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 476da79e4b..aff2c22aa0 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -74,16 +74,6 @@ jobs: and ([.attr] | inside($attrs))" >> $GITHUB_OUTPUT echo "VERSION=${TAG##*/}" >> $GITHUB_OUTPUT - build: - needs: eval-tag - uses: unionlabs/workflows/.github/workflows/build.yml@8fdbd5d131725a503e1e8c7a415edf6726da25c5 - secrets: - nixbuild_token: ${{ secrets.nixbuild_token }} - access-tokens: github.com=${{ secrets.GITHUB_TOKEN }} - org_token: ${{ secrets.UNION_ORG_PAT }} - with: - filter_builds: ${{ needs.eval-tag.outputs.build }} - download-images-x86_64: if: ${{ needs.eval-tag.outputs.image-produced }} needs: [build, eval-tag] From 08164f082223ff7898658e28ca70160ecb137c3e Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 14:01:32 -0600 Subject: [PATCH 05/16] fix(ci): remove bad needs --- .github/workflows/release-component.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index aff2c22aa0..f17cc18986 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -76,7 +76,7 @@ jobs: download-images-x86_64: if: ${{ needs.eval-tag.outputs.image-produced }} - needs: [build, eval-tag] + needs: [eval-tag] runs-on: ubuntu-24.04 steps: - uses: actions/checkout@v4 @@ -101,7 +101,7 @@ jobs: download-images-aarch64: if: ${{ needs.eval-tag.outputs.image-produced }} - needs: [build, eval-tag] + needs: [eval-tag] runs-on: ubuntu-24.04-arm steps: - uses: actions/checkout@v4 @@ -125,7 +125,7 @@ jobs: path: aarch64-linux.${{ needs.eval-tag.outputs.component }}-image download-binaries-x86_64: - needs: [build, eval-tag] + needs: [eval-tag] runs-on: ubuntu-24.04 strategy: matrix: From 2bc37bb2daf9195dd3969ca5a2823bcd7c763d3f Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 15:05:42 -0600 Subject: [PATCH 06/16] chore(ci): test cachix/install-nix-action --- .github/workflows/release-component.yml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index f17cc18986..77628529b9 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -82,9 +82,9 @@ jobs: - uses: actions/checkout@v4 with: lfs: true - - uses: nixbuild/nix-quick-install-action@v28 + - uses: cachix/install-nix-action@v30 with: - nix_conf: | + extra_nix_config: | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org - name: Fetch from Cache @@ -92,7 +92,7 @@ jobs: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | nix build .#packages.x86_64-linux."$COMPONENT" - cp -Lr result x86_64-linux.${{ needs.eval-tag.outputs.component }}-image + cp -Lr result x86_64-linux."$COMPONENT"-image exit 1 - uses: actions/upload-artifact@v4 with: @@ -107,9 +107,9 @@ jobs: - uses: actions/checkout@v4 with: lfs: true - - uses: nixbuild/nix-quick-install-action@v28 + - uses: cachix/install-nix-action@v30 with: - nix_conf: | + extra_nix_config: | trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org - name: Fetch from Cache From eebe557067af0f5834a4bcc0e3fde49f0e5e668f Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 16:03:30 -0600 Subject: [PATCH 07/16] chore(ci): test flow --- .github/workflows/release-component.yml | 86 ++++++++++++++----------- 1 file changed, 48 insertions(+), 38 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 77628529b9..aa6daa3a93 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -93,14 +93,13 @@ jobs: run: | nix build .#packages.x86_64-linux."$COMPONENT" cp -Lr result x86_64-linux."$COMPONENT"-image - exit 1 - uses: actions/upload-artifact@v4 with: name: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image path: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image download-images-aarch64: - if: ${{ needs.eval-tag.outputs.image-produced }} + if: ${{ needs.eval-tag.outputs.image-produced && contains(needs.eval-tag.outputs.systems, 'aarch64-linux') }} needs: [eval-tag] runs-on: ubuntu-24.04-arm steps: @@ -118,7 +117,6 @@ jobs: run: | nix build .#packages.aarch64-linux."$COMPONENT" cp -Lr result aarch64-linux."$COMPONENT"-image - exit 1 - uses: actions/upload-artifact@v4 with: name: aarch64-linux.${{ needs.eval-tag.outputs.component }}-image @@ -127,59 +125,69 @@ jobs: download-binaries-x86_64: needs: [eval-tag] runs-on: ubuntu-24.04 - strategy: - matrix: - system: ${{ fromJSON(needs.eval-tag.outputs.systems) }} steps: - - uses: actions/download-artifact@v4 + - uses: actions/checkout@v4 with: - name: packages.${{ matrix.system }}.${{ needs.eval-tag.outputs.component }} - - uses: nixbuild/nix-quick-install-action@v28 - - uses: nixbuild/nixbuild-action@812f1ab2b51842b0d44b9b79574611502d6940a0 + lfs: true + - uses: cachix/install-nix-action@v30 with: - nixbuild_token: ${{ secrets.nixbuild_token }} + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= + trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org - env: ARCHIVE: ${{ needs.eval-tag.outputs.archive }} COMPONENT: ${{ needs.eval-tag.outputs.component }} - SYSTEM: ${{ matrix.system }} run: | - exit 1 - mkdir "$SYSTEM" - echo "Getting OUTPUT and NARINFO_NAME" - OUTPUT=$(jq -r \ - --arg component "$COMPONENT" \ - --arg system "$SYSTEM" \ - '.packages[$system][$component].outputs.out' result.json) - NARINFO_NAME=$(basename "$OUTPUT" | cut -d'-' -f1) - - echo "Copying $OUTPUT from nixbuild.net" - nix copy --to "file://$(pwd)/$SYSTEM" --from ssh-ng://eu.nixbuild.net "$OUTPUT" --extra-experimental-features nix-command - - echo "Get the NAR_URL" - nar_url_line=$(cat "./$SYSTEM/$NARINFO_NAME.narinfo" | grep "URL:") - NAR_URL=$(echo "$nar_url_line" | cut -d " " -f 2-) + nix build .#packages.x86_64-linux."$COMPONENT" + if [[ "$COMPONENT" =~ uniond-release ]] + then + mv result/bin/uniond "$COMPONENT"-x86_64-linux + elif [[ $ARCHIVE ]] + then + tar -zcf "$COMPONENT"-x86_64-linux result + else + mv result/bin/"$COMPONENT" "$COMPONENT"-x86_64-linux + fi + - uses: actions/upload-artifact@v4 + with: + name: ${{ needs.eval-tag.outputs.component }}-x86_64-linux + path: ${{ needs.eval-tag.outputs.component }}-x86_64-linux - echo "Restore the package from the NAR_URL archive" - cat "$SYSTEM/$NAR_URL" | xz -dc | nix-store --restore "$SYSTEM.$COMPONENT" + download-binaries-aarch64: + needs: [eval-tag] + runs-on: ubuntu-24.04-arm + steps: + - uses: actions/checkout@v4 + with: + lfs: true + - uses: cachix/install-nix-action@v30 + with: + extra_nix_config: | + trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= cache.garnix.io:CTFPyKSLcx5RMJKfLo5EEPUObbA78b0YQ2DTCJXqr9g= union.cachix.org-1:TV9o8jexzNVbM1VNBOq9fu8NK+hL6ZhOyOh0quATy+M= + trusted-substituters = https://cache.nixos.org https://cache.garnix.io https://union.cachix.org + - env: + ARCHIVE: ${{ needs.eval-tag.outputs.archive }} + COMPONENT: ${{ needs.eval-tag.outputs.component }} + run: | + nix build .#packages.aarch64-linux."$COMPONENT" if [[ "$COMPONENT" =~ uniond-release ]] then - mv "$SYSTEM.$COMPONENT"/bin/uniond "$COMPONENT-$SYSTEM" + mv result/bin/uniond "$COMPONENT"-aarch64-linux elif [[ $ARCHIVE ]] then - ls -la - tar -zcf "$COMPONENT-$SYSTEM" "$SYSTEM.$COMPONENT" + tar -zcf "$COMPONENT"-aarch64-linux result else - mv "$SYSTEM.$COMPONENT/bin/$COMPONENT" "$COMPONENT-$SYSTEM" + mv result/bin/"$COMPONENT" "$COMPONENT"-aarch64-linux fi - uses: actions/upload-artifact@v4 with: - name: ${{ needs.eval-tag.outputs.component }}-${{ matrix.system }} - path: ${{ needs.eval-tag.outputs.component }}-${{ matrix.system }} + name: ${{ needs.eval-tag.outputs.component }}-aarch64-linux + path: ${{ needs.eval-tag.outputs.component }}-aarch64-linux release-images: - needs: [download-images-x86_64, eval-tag] + needs: [download-images-x86_64] if: ${{ needs.eval-tag.outputs.image-produced }} - runs-on: ubuntu-latest + runs-on: ubuntu-24.04 permissions: packages: write services: @@ -262,6 +270,7 @@ jobs: COMPONENT: ${{ needs.eval-tag.outputs.component }} TAG: ${{ needs.eval-tag.outputs.version }} run: | + exit 1 wget https://github.com/rapidsai/skopeo/releases/download/v1.12/skopeo-linux-amd64 -O ./skopeo chmod +x ./skopeo && sudo cp ./skopeo /usr/bin echo "downloaded & installed skopeo" @@ -269,7 +278,7 @@ jobs: echo "Copied $COMPONENT:$TAG multi-arch to GHCR" public-release: - needs: [download-binaries-x86_64, eval-tag] + needs: [download-binaries-x86_64] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 @@ -279,6 +288,7 @@ jobs: ARCHIVE: ${{ needs.eval-tag.outputs.archive }} SYSTEMS: ${{ needs.eval-tag.outputs.systems }} run: | + exit 1 echo "# sha256 Checksums" >> release.md x86_64=$(echo "$SYSTEMS" | jq 'contains(["x86_64-linux"])') aarch64=$(echo "$SYSTEMS" | jq 'contains(["aarch64-linux"])') From 9fe136dd2f85d464313779770aba84dae01a6868 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:10:36 -0600 Subject: [PATCH 08/16] chore(ci): force bundle release --- .github/workflows/release-component.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index aa6daa3a93..c58bf9cba1 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -17,8 +17,7 @@ jobs: steps: - id: eval env: - # TAG: ${{github.ref_name}} - TAG: bundle-testnet-9 + TAG: bundle-testnet-9/v0.25.0 run: | component="${TAG%/*}" case $component in @@ -270,7 +269,6 @@ jobs: COMPONENT: ${{ needs.eval-tag.outputs.component }} TAG: ${{ needs.eval-tag.outputs.version }} run: | - exit 1 wget https://github.com/rapidsai/skopeo/releases/download/v1.12/skopeo-linux-amd64 -O ./skopeo chmod +x ./skopeo && sudo cp ./skopeo /usr/bin echo "downloaded & installed skopeo" @@ -288,7 +286,6 @@ jobs: ARCHIVE: ${{ needs.eval-tag.outputs.archive }} SYSTEMS: ${{ needs.eval-tag.outputs.systems }} run: | - exit 1 echo "# sha256 Checksums" >> release.md x86_64=$(echo "$SYSTEMS" | jq 'contains(["x86_64-linux"])') aarch64=$(echo "$SYSTEMS" | jq 'contains(["aarch64-linux"])') From ea2a414d4b82cb6cd7c4b40c39837fab07591b34 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:34:31 -0600 Subject: [PATCH 09/16] fix(ci): accept flake config --- .github/workflows/release-component.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index c58bf9cba1..3aa0bd4330 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -90,7 +90,7 @@ jobs: env: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.x86_64-linux."$COMPONENT" + nix build .#packages.x86_64-linux."$COMPONENT" --accept-flake-config cp -Lr result x86_64-linux."$COMPONENT"-image - uses: actions/upload-artifact@v4 with: @@ -114,7 +114,7 @@ jobs: env: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.aarch64-linux."$COMPONENT" + nix build .#packages.aarch64-linux."$COMPONENT" --accept-flake-config cp -Lr result aarch64-linux."$COMPONENT"-image - uses: actions/upload-artifact@v4 with: @@ -137,7 +137,7 @@ jobs: ARCHIVE: ${{ needs.eval-tag.outputs.archive }} COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.x86_64-linux."$COMPONENT" + nix build .#packages.x86_64-linux."$COMPONENT" --accept-flake-config if [[ "$COMPONENT" =~ uniond-release ]] then mv result/bin/uniond "$COMPONENT"-x86_64-linux @@ -168,7 +168,7 @@ jobs: ARCHIVE: ${{ needs.eval-tag.outputs.archive }} COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.aarch64-linux."$COMPONENT" + nix build .#packages.aarch64-linux."$COMPONENT" --accept-flake-config if [[ "$COMPONENT" =~ uniond-release ]] then mv result/bin/uniond "$COMPONENT"-aarch64-linux From 2412d45072f85b832e2e75f417ea4e8300253237 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:43:42 -0600 Subject: [PATCH 10/16] fix(ci): require needed jobs --- .github/workflows/release-component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 3aa0bd4330..8ef63725c3 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -184,7 +184,7 @@ jobs: path: ${{ needs.eval-tag.outputs.component }}-aarch64-linux release-images: - needs: [download-images-x86_64] + needs: [download-images-x86_64, eval-tag] if: ${{ needs.eval-tag.outputs.image-produced }} runs-on: ubuntu-24.04 permissions: @@ -276,7 +276,7 @@ jobs: echo "Copied $COMPONENT:$TAG multi-arch to GHCR" public-release: - needs: [download-binaries-x86_64] + needs: [download-binaries-x86_64, eval-tag] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 From b4b29ef497acff1e9ddb0cc6a9aef733c6de57d7 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 19:49:42 -0600 Subject: [PATCH 11/16] chore(ci): debug --- .github/workflows/release-component.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 8ef63725c3..8bd8927670 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -217,6 +217,7 @@ jobs: for arch in 'aarch64-linux' 'x86_64-linux' do echo "Tagging $COMPONENT for $arch" + ls -la dockerstring=$(docker load < $arch.$COMPONENT-image) dockerstring=$(echo ${dockerstring##*':'}) echo "Getting image ID for $dockerstring" From 8fe90c1e9117641b15d03bbafad23d2baa9eea3f Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:02:31 -0600 Subject: [PATCH 12/16] chore(ci): debug --- .github/workflows/release-component.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 8bd8927670..502b5a00eb 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -217,6 +217,9 @@ jobs: for arch in 'aarch64-linux' 'x86_64-linux' do echo "Tagging $COMPONENT for $arch" + echo "GITHUB_WORKSPACE ($GITHUB_WORKSPACE)" + ls -la $GITHUB_WORKSPACE + echo "wd: ($(pwd))" ls -la dockerstring=$(docker load < $arch.$COMPONENT-image) dockerstring=$(echo ${dockerstring##*':'}) From f6464aec68add39c6f0d9b87b2ac69ce8202699a Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:21:11 -0600 Subject: [PATCH 13/16] fix(ci): specify download path --- .github/workflows/release-component.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 502b5a00eb..814c988aa3 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -204,10 +204,12 @@ jobs: uses: actions/download-artifact@v4 with: name: aarch64-linux.${{ needs.eval-tag.outputs.component }}-image + path: . - name: Download x86_64-linux.${{ needs.eval-tag.outputs.component }}-image uses: actions/download-artifact@v4 with: name: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image + path: . - name: Tag Docker Images env: COMPONENT: ${{ needs.eval-tag.outputs.component }} From 5bf928b322aa9832ffbe103804f3eb2e1d265b7c Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:29:07 -0600 Subject: [PATCH 14/16] fix(ci): build correct package --- .github/workflows/release-component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 814c988aa3..652d73694e 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -90,7 +90,7 @@ jobs: env: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.x86_64-linux."$COMPONENT" --accept-flake-config + nix build .#packages.x86_64-linux."$COMPONENT"-image --accept-flake-config cp -Lr result x86_64-linux."$COMPONENT"-image - uses: actions/upload-artifact@v4 with: @@ -114,7 +114,7 @@ jobs: env: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.aarch64-linux."$COMPONENT" --accept-flake-config + nix build .#packages.aarch64-linux."$COMPONENT"-image --accept-flake-config cp -Lr result aarch64-linux."$COMPONENT"-image - uses: actions/upload-artifact@v4 with: From 7e8da69c343e294f58557bab4dce2cbed64c2bc7 Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:33:50 -0600 Subject: [PATCH 15/16] fix(ci): wait on both arch --- .github/workflows/release-component.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index 652d73694e..f01d8e98bb 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -184,7 +184,7 @@ jobs: path: ${{ needs.eval-tag.outputs.component }}-aarch64-linux release-images: - needs: [download-images-x86_64, eval-tag] + needs: [download-images-x86_64, download-images-aarch64, eval-tag] if: ${{ needs.eval-tag.outputs.image-produced }} runs-on: ubuntu-24.04 permissions: @@ -282,7 +282,7 @@ jobs: echo "Copied $COMPONENT:$TAG multi-arch to GHCR" public-release: - needs: [download-binaries-x86_64, eval-tag] + needs: [download-binaries-x86_64, download-binaries-aarch64, eval-tag] runs-on: ubuntu-latest steps: - uses: actions/download-artifact@v4 From 0f7743f06e7a4f34e6e397642b45cb36a244354d Mon Sep 17 00:00:00 2001 From: PoisonPhang <17688291+PoisonPhang@users.noreply.github.com> Date: Fri, 17 Jan 2025 20:49:31 -0600 Subject: [PATCH 16/16] chore(ci): undo test changes --- .github/workflows/release-component.yml | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/.github/workflows/release-component.yml b/.github/workflows/release-component.yml index f01d8e98bb..281e1796d3 100644 --- a/.github/workflows/release-component.yml +++ b/.github/workflows/release-component.yml @@ -2,7 +2,7 @@ name: Release Component on: push: - # tags: ['*/v[0-9]+\.[0-9]+\.[0-9]+\-rc[0-9]+', '*/v[0-9]+\.[0-9]+\.[0-9]+'] + tags: ['*/v[0-9]+\.[0-9]+\.[0-9]+\-rc[0-9]+', '*/v[0-9]+\.[0-9]+\.[0-9]+'] jobs: eval-tag: @@ -17,7 +17,7 @@ jobs: steps: - id: eval env: - TAG: bundle-testnet-9/v0.25.0 + TAG: ${{github.ref_name}} run: | component="${TAG%/*}" case $component in @@ -90,8 +90,8 @@ jobs: env: COMPONENT: ${{ needs.eval-tag.outputs.component }} run: | - nix build .#packages.x86_64-linux."$COMPONENT"-image --accept-flake-config - cp -Lr result x86_64-linux."$COMPONENT"-image + nix build .#packages.x86_64-linux.\"$COMPONENT\"-image --accept-flake-config + cp -Lr result x86_64-linux.\"$COMPONENT\"-image - uses: actions/upload-artifact@v4 with: name: x86_64-linux.${{ needs.eval-tag.outputs.component }}-image