Fix nimble dependency caching in CI
This commit is contained in:
@@ -7,6 +7,10 @@ on:
|
|||||||
branches:
|
branches:
|
||||||
- master
|
- master
|
||||||
|
|
||||||
|
concurrency:
|
||||||
|
group: docker-publish-${{ github.ref }}
|
||||||
|
cancel-in-progress: true
|
||||||
|
|
||||||
env:
|
env:
|
||||||
IMAGE: zedeus/nitter
|
IMAGE: zedeus/nitter
|
||||||
|
|
||||||
@@ -15,8 +19,6 @@ jobs:
|
|||||||
uses: ./.github/workflows/run-tests.yml
|
uses: ./.github/workflows/run-tests.yml
|
||||||
secrets: inherit
|
secrets: inherit
|
||||||
|
|
||||||
# Build each architecture natively (no emulation) and push by digest only.
|
|
||||||
# The digests are stitched into a single multi-arch tag by the merge job.
|
|
||||||
build:
|
build:
|
||||||
needs: [tests]
|
needs: [tests]
|
||||||
strategy:
|
strategy:
|
||||||
@@ -55,8 +57,6 @@ jobs:
|
|||||||
file: ./Dockerfile
|
file: ./Dockerfile
|
||||||
platforms: ${{ matrix.platform }}
|
platforms: ${{ matrix.platform }}
|
||||||
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
outputs: type=image,name=${{ env.IMAGE }},push-by-digest=true,name-canonical=true,push=true
|
||||||
# Attestations turn a single-platform push into a manifest index, which
|
|
||||||
# breaks push-by-digest + the imagetools merge below. Disable them.
|
|
||||||
provenance: false
|
provenance: false
|
||||||
sbom: false
|
sbom: false
|
||||||
|
|
||||||
@@ -101,10 +101,6 @@ jobs:
|
|||||||
- name: Create manifest list and push
|
- name: Create manifest list and push
|
||||||
working-directory: ${{ runner.temp }}/digests
|
working-directory: ${{ runner.temp }}/digests
|
||||||
run: |
|
run: |
|
||||||
# latest-arm64 is a backward-compat alias of the (now multi-arch)
|
|
||||||
# latest tag, for users still pinned to the old ARM64-only image.
|
|
||||||
# word splitting is intentional: one image ref arg per digest file
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
docker buildx imagetools create \
|
docker buildx imagetools create \
|
||||||
-t ${{ env.IMAGE }}:latest \
|
-t ${{ env.IMAGE }}:latest \
|
||||||
-t ${{ env.IMAGE }}:latest-arm64 \
|
-t ${{ env.IMAGE }}:latest-arm64 \
|
||||||
|
|||||||
@@ -32,10 +32,12 @@ jobs:
|
|||||||
id: cache-nimble
|
id: cache-nimble
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.nimble
|
path: |
|
||||||
key: ${{ matrix.nim }}-nimble-v3-${{ hashFiles('*.nimble') }}
|
~/.nimble/pkgcache
|
||||||
|
~/.nimble/packages_official.json
|
||||||
|
key: ${{ matrix.nim }}-nimble-v6-${{ hashFiles('*.nimble') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
${{ matrix.nim }}-nimble-v3-
|
${{ matrix.nim }}-nimble-v6-
|
||||||
|
|
||||||
- name: Setup Nim
|
- name: Setup Nim
|
||||||
uses: jiro4989/setup-nim-action@v2
|
uses: jiro4989/setup-nim-action@v2
|
||||||
@@ -103,10 +105,12 @@ jobs:
|
|||||||
- name: Cache Nimble Dependencies
|
- name: Cache Nimble Dependencies
|
||||||
uses: actions/cache@v5
|
uses: actions/cache@v5
|
||||||
with:
|
with:
|
||||||
path: ~/.nimble
|
path: |
|
||||||
key: 2.2.x-nimble-v3-${{ hashFiles('*.nimble') }}
|
~/.nimble/pkgcache
|
||||||
|
~/.nimble/packages_official.json
|
||||||
|
key: 2.2.x-nimble-v6-${{ hashFiles('*.nimble') }}
|
||||||
restore-keys: |
|
restore-keys: |
|
||||||
2.2.x-nimble-v3-
|
2.2.x-nimble-v6-
|
||||||
|
|
||||||
- name: Setup Nim
|
- name: Setup Nim
|
||||||
uses: jiro4989/setup-nim-action@v2
|
uses: jiro4989/setup-nim-action@v2
|
||||||
@@ -115,6 +119,9 @@ jobs:
|
|||||||
use-nightlies: true
|
use-nightlies: true
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
|
- name: Install Nimble dependencies
|
||||||
|
run: nimble install -y --depsOnly
|
||||||
|
|
||||||
- name: Download 2.2.x build artifact
|
- name: Download 2.2.x build artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
@@ -130,10 +137,8 @@ jobs:
|
|||||||
sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf
|
sed -i 's/enableDebug = false/enableDebug = true/g' nitter.conf
|
||||||
sed -i 's/maxRetries = 1/maxRetries = 10/g' nitter.conf
|
sed -i 's/maxRetries = 1/maxRetries = 10/g' nitter.conf
|
||||||
|
|
||||||
# Run both Nimble tasks concurrently
|
nim r tools/rendermd.nim
|
||||||
nim r tools/rendermd.nim &
|
nim r tools/gencss.nim
|
||||||
nim r tools/gencss.nim &
|
|
||||||
wait
|
|
||||||
|
|
||||||
echo '${{ secrets.SESSIONS }}' | head -n1
|
echo '${{ secrets.SESSIONS }}' | head -n1
|
||||||
echo '${{ secrets.SESSIONS }}' > ./sessions.jsonl
|
echo '${{ secrets.SESSIONS }}' > ./sessions.jsonl
|
||||||
|
|||||||
+1
-2
@@ -18,8 +18,7 @@ requires "nimcrypto#a079df9"
|
|||||||
requires "markdown#158efe3"
|
requires "markdown#158efe3"
|
||||||
requires "packedjson#9e6fbb6"
|
requires "packedjson#9e6fbb6"
|
||||||
requires "supersnappy#6c94198"
|
requires "supersnappy#6c94198"
|
||||||
requires "https://github.com/zedeus/redpool#8b7c1db"
|
requires "redpool >= 0.2.0"
|
||||||
requires "https://github.com/zedeus/redis#d0a0e6f"
|
|
||||||
requires "zippy#ca5989a"
|
requires "zippy#ca5989a"
|
||||||
requires "flatty#e668085"
|
requires "flatty#e668085"
|
||||||
requires "jsony#1de1f08"
|
requires "jsony#1de1f08"
|
||||||
|
|||||||
Reference in New Issue
Block a user