ci: add nightly snapshot build (02:00 UTC schedule)
StarshipOS Build / milkv (push) Failing after 31s
StarshipOS Build / pc (push) Failing after 28s
StarshipOS Build / pi4 (push) Failing after 36s
StarshipOS Build / pi5 (push) Failing after 37s
StarshipOS Build / qemu (push) Failing after 25s
StarshipOS Build / Isabelle/HOL Proofs (push) Failing after 33s
StarshipOS Build / Documentation (push) Failing after 25s
StarshipOS Build / milkv (push) Failing after 31s
StarshipOS Build / pc (push) Failing after 28s
StarshipOS Build / pi4 (push) Failing after 36s
StarshipOS Build / pi5 (push) Failing after 37s
StarshipOS Build / qemu (push) Failing after 25s
StarshipOS Build / Isabelle/HOL Proofs (push) Failing after 33s
StarshipOS Build / Documentation (push) Failing after 25s
Scheduled runs use -SNAPSHOT version suffix and publish to starshipos-snapshots Nexus repo instead of starshipos-releases. Push-to-master releases continue to use -<sha> suffix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -5,9 +5,12 @@ on:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 2 * * *' # 02:00 UTC nightly snapshot
|
||||
|
||||
env:
|
||||
NEXUS: https://nexus.starshipos-f18.org/repository/starshipos-releases
|
||||
NEXUS: https://nexus.starshipos-f18.org/repository/starshipos-releases
|
||||
NEXUS_SNAP: https://nexus.starshipos-f18.org/repository/starshipos-snapshots
|
||||
|
||||
jobs:
|
||||
build:
|
||||
@@ -68,9 +71,15 @@ jobs:
|
||||
LITHOS=$(grep 'LITHOS_VERSION\s*?=' Makefile.starkernel | head -1 | sed 's/.*= *//')
|
||||
SF=$(grep '^VERSION\s*?=' Makefile | head -1 | sed 's/.*= *//')
|
||||
SHA=$(git rev-parse --short HEAD)
|
||||
echo "lithos=${LITHOS}-${SHA}" >> $GITHUB_OUTPUT
|
||||
echo "sf=${SF}-${SHA}" >> $GITHUB_OUTPUT
|
||||
echo "sha=${SHA}" >> $GITHUB_OUTPUT
|
||||
if [ "${{ github.event_name }}" = "schedule" ]; then
|
||||
SUFFIX="-SNAPSHOT"
|
||||
else
|
||||
SUFFIX="-${SHA}"
|
||||
fi
|
||||
echo "lithos=${LITHOS}${SUFFIX}" >> $GITHUB_OUTPUT
|
||||
echo "sf=${SF}${SUFFIX}" >> $GITHUB_OUTPUT
|
||||
echo "sha=${SHA}" >> $GITHUB_OUTPUT
|
||||
echo "is_snapshot=${{ github.event_name == 'schedule' }}" >> $GITHUB_OUTPUT
|
||||
|
||||
- name: Build StarForth VM
|
||||
run: make T=${{ matrix.board }}
|
||||
@@ -130,7 +139,7 @@ jobs:
|
||||
build/${{ matrix.vm_arch }}/fastest/starforth
|
||||
|
||||
- name: Publish to Nexus
|
||||
if: github.ref == 'refs/heads/master'
|
||||
if: github.ref == 'refs/heads/master' || github.event_name == 'schedule'
|
||||
env:
|
||||
NEXUS_PASS: ${{ secrets.NEXUS_CI_PASSWORD }}
|
||||
BOARD: ${{ matrix.board }}
|
||||
@@ -139,15 +148,18 @@ jobs:
|
||||
KVER: ${{ steps.ver.outputs.lithos }}
|
||||
SFVER: ${{ steps.ver.outputs.sf }}
|
||||
IMG_TYPE: ${{ matrix.img_type }}
|
||||
IS_SNAPSHOT: ${{ steps.ver.outputs.is_snapshot }}
|
||||
run: |
|
||||
set -e
|
||||
REPO="${IS_SNAPSHOT:+$NEXUS_SNAP}"
|
||||
REPO="${REPO:-$NEXUS}"
|
||||
push() {
|
||||
local coord="$1" file="$2"
|
||||
echo "→ org.f18:${coord}"
|
||||
curl -fsS --retry 3 \
|
||||
-u "ci-publisher:${NEXUS_PASS}" \
|
||||
-H "Content-Type: application/octet-stream" \
|
||||
-X PUT "${NEXUS}/org/f18/${coord}" \
|
||||
-X PUT "${REPO}/org/f18/${coord}" \
|
||||
--upload-file "$file"
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user