diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 322c49e..14489e3 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -88,27 +88,9 @@ jobs: # - run: nix build -L --no-link ".#bertie" - run: true - success: + message_results: needs: [hax, charon, eurydice, ml-kem, bertie] runs-on: [self-hosted, linux, nix] - steps: - - name: checkout - uses: actions/checkout@v4 - with: - ref: nightly - - - name: commit the good flake.lock - run: | - [[ $(git diff) != "" ]] || exit 0 - git config --local user.name "Prosecco" - git config --local user.email "prosecco@inria.fr" - cp flake.lock good.lock - git commit -am "record the last-good flake lock" - git push - - complete: - needs: [hax, charon, eurydice, ml-kem, bertie, success] - runs-on: [self-hosted, linux, nix] if: ${{ success() || failure() }} # Will always run unless canceled steps: - name: checkout @@ -146,3 +128,23 @@ jobs: # { "text": "Unexpected Error: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" } # env: # SLACK_WEBHOOK_URL: ${{ secrets.ZULIP_WEBHOOK_URL }} + + success: + needs: [hax, charon, eurydice, ml-kem, bertie, message_results] + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + + - name: commit the good flake.lock + run: | + [[ $(git diff) != "" ]] || exit 0 + git config --local user.name "Prosecco" + git config --local user.email "prosecco@inria.fr" + cp flake.lock good.lock + git commit -am "record the last-good flake lock" + # TODO: push to main if run from workflow or cron + git push + diff --git a/message.sh b/message.sh index e12b618..36e3c49 100755 --- a/message.sh +++ b/message.sh @@ -1,7 +1,7 @@ #!/usr/bin/env bash echo "*Nightly update*" -if [[ "$(jq -r .success.result results.json)" == "success" ]]; then +if [[ "$(jq 'map(.result == "success") | all' results.json)" == "true" ]]; then echo '✅✅✅' else echo '❌❌❌' @@ -15,12 +15,8 @@ echo "run: https://github.com/inria-prosecco/circus-green/actions/runs/$RUN" echo "" echo "*Statuses:*" -echo aaaa -cat results.json -jq . results.json -jq .hax results.json for project in hax charon eurydice ml-kem bertie; do - status="$(jq -r 'if .["'"$project"'"].result == "success" then "a" else "b" end' results.json)" + status="$(jq -r 'if .["'"$project"'"].result == "success" then "✅" else "❌" end' results.json)" echo "$status $project (main)" done echo ""