68 lines
2.2 KiB
YAML
68 lines
2.2 KiB
YAML
name: Verify Lyra CLI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
verify:
|
|
if: gitea.ref == 'refs/heads/main'
|
|
runs-on: ces-control
|
|
timeout-minutes: 60
|
|
env:
|
|
DOCKER_BUILDKIT: "0"
|
|
steps:
|
|
- name: Checkout project
|
|
id: checkout_project
|
|
uses: actions/checkout@v4
|
|
with:
|
|
github-server-url: ${{ gitea.server_url }}
|
|
persist-credentials: false
|
|
- name: Read pinned Aster revision
|
|
id: aster_revision
|
|
run: |
|
|
set -eu
|
|
aster_sha=$(git ls-tree HEAD -- vendor/aster | awk '$1 == "160000" && $2 == "commit" && $4 == "vendor/aster" { print $3 }')
|
|
case "$aster_sha" in *[!0-9a-f]*|'') echo "Invalid Aster gitlink" >&2; exit 1;; esac
|
|
test "${#aster_sha}" -eq 40
|
|
printf 'sha=%s\n' "$aster_sha" >> "$GITHUB_OUTPUT"
|
|
- name: Checkout pinned Aster
|
|
id: checkout_aster
|
|
uses: actions/checkout@v4
|
|
with:
|
|
github-server-url: ${{ gitea.server_url }}
|
|
repository: Zayden-Jung/endorphin-aster-vm
|
|
ref: ${{ steps.aster_revision.outputs.sha }}
|
|
path: vendor/aster
|
|
persist-credentials: false
|
|
- name: Verify Aster revision
|
|
env:
|
|
EXPECTED_ASTER_SHA: ${{ steps.aster_revision.outputs.sha }}
|
|
run: test "$(git -C vendor/aster rev-parse HEAD)" = "$EXPECTED_ASTER_SHA"
|
|
|
|
- name: Verify CLI and record Endor output
|
|
env:
|
|
LYRA_RELEASE_SHA: ${{ gitea.sha }}
|
|
run: sh scripts/ci-ces-control.sh
|
|
- name: Show Endor output
|
|
if: ${{ always() && steps.checkout_aster.outcome == 'success' }}
|
|
run: cat ci-output/endor-examples.md
|
|
- name: Upload Endor output
|
|
if: ${{ always() && steps.checkout_aster.outcome == 'success' }}
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: endor-execution-output-${{ gitea.sha }}
|
|
path: |
|
|
ci-output/endor-examples.md
|
|
ci-output/endor-examples.json
|
|
if-no-files-found: error
|
|
retention-days: 30
|
|
- name: Upload Linux CLI
|
|
uses: actions/upload-artifact@v3
|
|
with:
|
|
name: lyra-linux-${{ gitea.sha }}
|
|
path: ci-output/lyra
|
|
if-no-files-found: error
|
|
retention-days: 30
|