From 61bda4b3876b60d7a322cc3ca25bb58e8f2e720d Mon Sep 17 00:00:00 2001 From: Nadrieril Date: Wed, 13 Nov 2024 15:19:31 +0100 Subject: [PATCH] Rework CI --- .github/workflows/nightly.yml | 109 ++++- STATUS.txt | 5 - good.lock | 753 ---------------------------------- message.sh | 27 +- update.sh | 21 +- 5 files changed, 123 insertions(+), 792 deletions(-) delete mode 100644 STATUS.txt delete mode 100644 good.lock diff --git a/.github/workflows/nightly.yml b/.github/workflows/nightly.yml index 6af0189..8ccbbdb 100644 --- a/.github/workflows/nightly.yml +++ b/.github/workflows/nightly.yml @@ -2,9 +2,15 @@ on: schedule: - cron: '0 0 * * *' workflow_dispatch: + push: + +# Cancel previous versions of this job that are still running. +concurrency: + group: nightly + cancel-in-progress: true jobs: - nightly: + update-flake: runs-on: [self-hosted, linux, nix] steps: - name: checkout @@ -13,31 +19,102 @@ jobs: - name: update run: ./update.sh + # Commit the update onto a new branch - name: commit run: | [[ $(git diff) != "" ]] || exit 0 git config --local user.name "Prosecco" git config --local user.email "prosecco@inria.fr" + git checkout -b nightly git commit -am "nightly update" + git push origin --force nightly:nightly + + # This would be nicer as a matrix, but that hits limits of what github actions can currenctly express. See e.g.: + # - https://github.com/orgs/community/discussions/17245 + # - https://github.com/orgs/community/discussions/26640 + # - https://github.com/actions/runner/pull/2477 + hax: + needs: update-flake + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + # - run: nix build -L --no-link ".#hax" + - run: true + + charon: + needs: update-flake + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + # - run: nix build -L --no-link ".#charon" + - run: false + + eurydice: + needs: update-flake + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + # - run: nix build -L --no-link ".#eurydice" + - run: true - - name: push - uses: ad-m/github-push-action@master + ml-kem: + needs: update-flake + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout with: - branch: main + ref: nightly + uses: actions/checkout@v4 + # - run: nix build -L --no-link ".#ml-kem" + - run: true + + bertie: + needs: update-flake + runs-on: [self-hosted, linux, nix] + steps: + - name: checkout + with: + ref: nightly + uses: actions/checkout@v4 + # - run: nix build -L --no-link ".#bertie" + - run: true + + message_results: + needs: [hax, charon, eurydice, ml-kem, bertie] + runs-on: [self-hosted, linux, nix] + if: ${{ success() || failure() }} # Will always run unless canceled + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + fetch-depth: 0 # deep clone in order to get access to other commits - name: generate zulip message + env: + RUN: ${{ github.run_id }} + RESULTS: ${{ toJSON(needs) }} run: | + echo "$RESULTS" > results.json + nix shell nixpkgs#jq --command ./message.sh | tee message.txt { echo 'MSG<> "$GITHUB_ENV" - env: - RUN: ${{ github.run_id }} - name: send zulip info message uses: slackapi/slack-github-action@v1.25.0 + if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} with: payload: | { "text": ${{ toJSON(env.MSG) }} } @@ -45,10 +122,24 @@ jobs: SLACK_WEBHOOK_URL: ${{ secrets.ZULIP_WEBHOOK_URL }} - name: send zulip error message - if: ${{ failure() }} + if: ${{ failure() && (github.event_name == 'schedule' || github.event_name == 'workflow_dispatch') }} uses: slackapi/slack-github-action@v1.25.0 with: payload: | { "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] + if: ${{ github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' }} + steps: + - name: checkout + uses: actions/checkout@v4 + with: + ref: nightly + + - name: push to main + run: git push origin HEAD:main + diff --git a/STATUS.txt b/STATUS.txt deleted file mode 100644 index 68dbaf5..0000000 --- a/STATUS.txt +++ /dev/null @@ -1,5 +0,0 @@ -✅ hax (main) -✅ charon (main) -✅ eurydice (main) -❌ ml-kem (main) -✅ bertie (main) diff --git a/good.lock b/good.lock deleted file mode 100644 index 153eff9..0000000 --- a/good.lock +++ /dev/null @@ -1,753 +0,0 @@ -{ - "nodes": { - "bertie": { - "inputs": { - "crane": "crane", - "flake-utils": "flake-utils", - "hax": [ - "hax" - ], - "nixpkgs": "nixpkgs" - }, - "locked": { - "lastModified": 1719997219, - "narHash": "sha256-PfGKfH5AoJ3ctAZwHICVbWalS+9FxDVb8EEcD9j+/Ss=", - "owner": "cryspen", - "repo": "bertie", - "rev": "b5775ee9f2d58cd2180b4ee32937abb9103f4087", - "type": "github" - }, - "original": { - "owner": "cryspen", - "repo": "bertie", - "type": "github" - } - }, - "charon": { - "inputs": { - "crane": "crane_2", - "flake-compat": "flake-compat", - "flake-utils": "flake-utils_2", - "nixpkgs": [ - "eurydice", - "nixpkgs" - ], - "rust-overlay": "rust-overlay" - }, - "locked": { - "lastModified": 1730738130, - "narHash": "sha256-Gr81tQuo+IKZ87rMz1oMpJ+ccgGh7sAjQXe5jJsYWzc=", - "owner": "aeneasverif", - "repo": "charon", - "rev": "2193aa00fd89e991226ada10d8a8f66e0594f212", - "type": "github" - }, - "original": { - "owner": "aeneasverif", - "repo": "charon", - "type": "github" - } - }, - "crane": { - "inputs": { - "nixpkgs": [ - "bertie", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717386774, - "narHash": "sha256-YYMGHDo4f+tu7k2q6hWNiI5C8gAN5eksb3g3EbKFf4k=", - "owner": "ipetkov", - "repo": "crane", - "rev": "ad21f86e47a2751faa99aecd0d494be70411d5e9", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_2": { - "locked": { - "lastModified": 1727316705, - "narHash": "sha256-/mumx8AQ5xFuCJqxCIOFCHTVlxHkMT21idpbgbm/TIE=", - "owner": "ipetkov", - "repo": "crane", - "rev": "5b03654ce046b5167e7b0bccbd8244cb56c16f0e", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_3": { - "inputs": { - "nixpkgs": [ - "hax", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1717386774, - "narHash": "sha256-YYMGHDo4f+tu7k2q6hWNiI5C8gAN5eksb3g3EbKFf4k=", - "owner": "ipetkov", - "repo": "crane", - "rev": "ad21f86e47a2751faa99aecd0d494be70411d5e9", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "crane_4": { - "inputs": { - "nixpkgs": [ - "libcrux", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1718078026, - "narHash": "sha256-LbQabH6h86ZzTvDnaZHmMwedRZNB2jYtUQzmoqWQoJ8=", - "owner": "ipetkov", - "repo": "crane", - "rev": "a3f0c63eed74a516298932b9b1627dd80b9c3892", - "type": "github" - }, - "original": { - "owner": "ipetkov", - "repo": "crane", - "type": "github" - } - }, - "eurydice": { - "inputs": { - "charon": [ - "charon" - ], - "flake-utils": "flake-utils_3", - "fstar": "fstar", - "karamel": "karamel", - "nixpkgs": [ - "eurydice", - "karamel", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729531926, - "narHash": "sha256-PgrONS21WvOnlXEjnrD7YQBSKUcudzhwoWDp71sU+6Q=", - "owner": "aeneasverif", - "repo": "eurydice", - "rev": "dcfae68c874635956f71d4c05928841b29ad0a8b", - "type": "github" - }, - "original": { - "owner": "aeneasverif", - "repo": "eurydice", - "type": "github" - } - }, - "flake-compat": { - "locked": { - "lastModified": 1717312683, - "narHash": "sha256-FrlieJH50AuvagamEvWMIE6D2OAnERuDboFDYAED/dE=", - "owner": "nix-community", - "repo": "flake-compat", - "rev": "38fd3954cf65ce6faf3d0d45cd26059e059f07ea", - "type": "github" - }, - "original": { - "owner": "nix-community", - "repo": "flake-compat", - "type": "github" - } - }, - "flake-utils": { - "inputs": { - "systems": "systems" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_2": { - "inputs": { - "systems": "systems_2" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_3": { - "inputs": { - "systems": "systems_3" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_4": { - "inputs": { - "systems": "systems_4" - }, - "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_5": { - "inputs": { - "systems": "systems_5" - }, - "locked": { - "lastModified": 1692799911, - "narHash": "sha256-3eihraek4qL744EvQXsK1Ha6C3CR7nnT8X2qWap4RNk=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "f9e7cf818399d17d347f847525c5a5a8032e4e44", - "type": "github" - }, - "original": { - "id": "flake-utils", - "type": "indirect" - } - }, - "flake-utils_6": { - "inputs": { - "systems": "systems_6" - }, - "locked": { - "lastModified": 1726560853, - "narHash": "sha256-X6rJYSESBVr3hBoH0WbKE5KvhPU5bloyZ2L4K60/fPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "c1dfcf08411b08f6b8615f7d8971a2bfa81d5e8a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_7": { - "inputs": { - "systems": "systems_7" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "flake-utils_8": { - "inputs": { - "systems": "systems_8" - }, - "locked": { - "lastModified": 1710146030, - "narHash": "sha256-SZ5L6eA7HJ/nmkzGG7/ISclqe6oZdOZTNoesiInkXPQ=", - "owner": "numtide", - "repo": "flake-utils", - "rev": "b1d9ab70662946ef0850d488da1c9019f3a9752a", - "type": "github" - }, - "original": { - "owner": "numtide", - "repo": "flake-utils", - "type": "github" - } - }, - "fstar": { - "inputs": { - "flake-utils": "flake-utils_4", - "nixpkgs": "nixpkgs_2" - }, - "locked": { - "lastModified": 1727362033, - "narHash": "sha256-upAtvg0IUwKj7uZLuCUpRy+C1xMIyrnPauICIY9L5k8=", - "owner": "FStarLang", - "repo": "fstar", - "rev": "87a9ba9e82dfa727000edaaa8134e1feb083a704", - "type": "github" - }, - "original": { - "owner": "FStarLang", - "repo": "fstar", - "type": "github" - } - }, - "fstar_2": { - "inputs": { - "flake-utils": "flake-utils_5", - "nixpkgs": "nixpkgs_3" - }, - "locked": { - "lastModified": 1727362033, - "narHash": "sha256-upAtvg0IUwKj7uZLuCUpRy+C1xMIyrnPauICIY9L5k8=", - "owner": "fstarlang", - "repo": "fstar", - "rev": "87a9ba9e82dfa727000edaaa8134e1feb083a704", - "type": "github" - }, - "original": { - "owner": "fstarlang", - "repo": "fstar", - "type": "github" - } - }, - "fstar_3": { - "inputs": { - "flake-utils": [ - "hax", - "flake-utils" - ], - "nixpkgs": [ - "hax", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1705191588, - "narHash": "sha256-xjSWDP8mSjLcn+0hsRpEdzsBgBR+mKCZB8yLmHl+WqE=", - "owner": "FStarLang", - "repo": "FStar", - "rev": "a32b316e521fa4f239b610ec8f1d15e78d62cbe8", - "type": "github" - }, - "original": { - "owner": "FStarLang", - "ref": "v2024.01.13", - "repo": "FStar", - "type": "github" - } - }, - "hacl-star": { - "flake": false, - "locked": { - "lastModified": 1716379562, - "narHash": "sha256-42dF8kPEiveSPgHoicxZG/CCu3IhwJhtfvVNfrLczu8=", - "owner": "hacl-star", - "repo": "hacl-star", - "rev": "9149b0c26b06a8e06a0920a07c33ddd18d94c519", - "type": "github" - }, - "original": { - "owner": "hacl-star", - "repo": "hacl-star", - "type": "github" - } - }, - "hax": { - "inputs": { - "crane": "crane_3", - "flake-utils": "flake-utils_7", - "fstar": "fstar_3", - "hacl-star": "hacl-star", - "nixpkgs": "nixpkgs_4", - "rust-by-examples": "rust-by-examples", - "rust-overlay": "rust-overlay_2" - }, - "locked": { - "lastModified": 1730733331, - "narHash": "sha256-2anojF5GYpudtHHwKfR80pFwsf/+y/WdlIN9kHAvams=", - "owner": "hacspec", - "repo": "hax", - "rev": "3a78c298a232cb0b10f0dfe351d0a4175b806908", - "type": "github" - }, - "original": { - "owner": "hacspec", - "repo": "hax", - "type": "github" - } - }, - "karamel": { - "inputs": { - "flake-utils": [ - "eurydice", - "karamel", - "fstar", - "flake-utils" - ], - "fstar": "fstar_2", - "nixpkgs": [ - "eurydice", - "karamel", - "fstar", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1727374126, - "narHash": "sha256-S7EEA9cLb2tdPc2vDG/Fd7a2gV0kUiL3P/wRuTm97/Y=", - "owner": "FStarLang", - "repo": "karamel", - "rev": "8c3612018c25889288da6857771be3ad03b75bcd", - "type": "github" - }, - "original": { - "owner": "FStarLang", - "repo": "karamel", - "type": "github" - } - }, - "libcrux": { - "inputs": { - "charon": [ - "charon" - ], - "crane": "crane_4", - "eurydice": [ - "eurydice" - ], - "flake-utils": "flake-utils_8", - "fstar": [ - "eurydice", - "fstar" - ], - "hax": [ - "hax" - ], - "karamel": [ - "eurydice", - "karamel" - ], - "nixpkgs": "nixpkgs_5" - }, - "locked": { - "lastModified": 1729541924, - "narHash": "sha256-azz11KhCnF4onB1kVIozK5lP6m93gCAVHEBNSMXHmN4=", - "owner": "cryspen", - "repo": "libcrux", - "rev": "13a5dead2cffbec8e7653b532a7e12545801e0a5", - "type": "github" - }, - "original": { - "owner": "cryspen", - "repo": "libcrux", - "type": "github" - } - }, - "nixpkgs": { - "locked": { - "lastModified": 1717196966, - "narHash": "sha256-yZKhxVIKd2lsbOqYd5iDoUIwsRZFqE87smE2Vzf6Ck0=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "57610d2f8f0937f39dbd72251e9614b1561942d8", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_2": { - "locked": { - "lastModified": 1693158576, - "narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_3": { - "locked": { - "lastModified": 1693158576, - "narHash": "sha256-aRTTXkYvhXosGx535iAFUaoFboUrZSYb1Ooih/auGp0=", - "owner": "NixOS", - "repo": "nixpkgs", - "rev": "a999c1cc0c9eb2095729d5aa03e0d8f7ed256780", - "type": "github" - }, - "original": { - "id": "nixpkgs", - "ref": "nixos-unstable", - "type": "indirect" - } - }, - "nixpkgs_4": { - "locked": { - "lastModified": 1717402443, - "narHash": "sha256-KlFiT8xFAVy29iYJU9nBwvkC7WTfUC/jak5jNFz5wHM=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c149b8818b982d612f519c7e73449d355206a89a", - "type": "github" - }, - "original": { - "owner": "nixos", - "repo": "nixpkgs", - "type": "github" - } - }, - "nixpkgs_5": { - "locked": { - "lastModified": 1717974879, - "narHash": "sha256-GTO3C88+5DX171F/gVS3Qga/hOs/eRMxPFpiHq2t+D8=", - "owner": "nixos", - "repo": "nixpkgs", - "rev": "c7b821ba2e1e635ba5a76d299af62821cbcb09f3", - "type": "github" - }, - "original": { - "owner": "nixos", - "ref": "nixos-unstable", - "repo": "nixpkgs", - "type": "github" - } - }, - "root": { - "inputs": { - "bertie": "bertie", - "charon": "charon", - "eurydice": "eurydice", - "flake-utils": "flake-utils_6", - "hax": "hax", - "libcrux": "libcrux" - } - }, - "rust-by-examples": { - "flake": false, - "locked": { - "lastModified": 1729958822, - "narHash": "sha256-/X1dI2MPYSfOdqOOxpNFCykoJtVetQCOo7WfBa7XAyU=", - "owner": "rust-lang", - "repo": "rust-by-example", - "rev": "4e3881e0cb1b690158acca3c16e271fdadf736da", - "type": "github" - }, - "original": { - "owner": "rust-lang", - "repo": "rust-by-example", - "type": "github" - } - }, - "rust-overlay": { - "inputs": { - "nixpkgs": [ - "charon", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729736953, - "narHash": "sha256-Rb6JUop7NRklg0uzcre+A+Ebrn/ZiQPkm4QdKg6/3pw=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "29b1275740d9283467b8117499ec8cbb35250584", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "rust-overlay_2": { - "inputs": { - "nixpkgs": [ - "hax", - "nixpkgs" - ] - }, - "locked": { - "lastModified": 1729736953, - "narHash": "sha256-Rb6JUop7NRklg0uzcre+A+Ebrn/ZiQPkm4QdKg6/3pw=", - "owner": "oxalica", - "repo": "rust-overlay", - "rev": "29b1275740d9283467b8117499ec8cbb35250584", - "type": "github" - }, - "original": { - "owner": "oxalica", - "repo": "rust-overlay", - "type": "github" - } - }, - "systems": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_2": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_3": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_4": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_5": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_6": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_7": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - }, - "systems_8": { - "locked": { - "lastModified": 1681028828, - "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", - "owner": "nix-systems", - "repo": "default", - "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", - "type": "github" - }, - "original": { - "owner": "nix-systems", - "repo": "default", - "type": "github" - } - } - }, - "root": "root", - "version": 7 -} diff --git a/message.sh b/message.sh index aab4012..e42c272 100755 --- a/message.sh +++ b/message.sh @@ -1,19 +1,36 @@ #!/usr/bin/env bash -cat STATUS.txt | grep '❌' > /dev/null && echo '❌❌❌' || echo '✅✅✅' +echo "*Nightly update*" +if [[ "$(jq 'map(.result == "success") | all' results.json)" == "true" ]]; then + echo '✅✅✅' +else + echo '❌❌❌' +fi echo "" + echo "*Links:*" -echo "commit: https://github.com/inria-prosecco/circus-green/commit/$(git show-ref --hash refs/heads/main)" +COMMIT="$(git rev-parse HEAD)" +echo "commit: https://github.com/inria-prosecco/circus-green/commit/$COMMIT" echo "run: https://github.com/inria-prosecco/circus-green/actions/runs/$RUN" echo "" + echo "*Statuses:*" -cat STATUS.txt +for project in hax charon eurydice ml-kem bertie; do + status="$(jq -r 'if .["'"$project"'"].result == "success" then "✅" else "❌" end' results.json)" + echo "$status $project (main)" +done echo "" + echo "*Tried to update:*" +git show origin/main:flake.lock > good.lock cat flake.lock good.lock | jq -s -r ' map( .nodes | [ .fstar, .karamel, .hax, .charon, .eurydice, .libcrux, .bertie ] | map( .locked ) - ) | transpose | map(select(.[0].rev != .[1].rev)) | .[] | - (.[0].repo + ": [" + .[1].rev[0:8] + ".." + .[0].rev[0:8] + "](https://github.com/" + .[0].owner + "/" + .[0].repo + "/compare/" + .[1].rev[0:8] + "..." + .[0].rev[0:8] + ")") + ) + | transpose + | .[] + | select(.[0].rev != .[1].rev) + | "\(.[1].rev[0:8])..\(.[0].rev[0:8])" as $range + | "\(.[0].repo): [\($range)](https://github.com/\(.[0].owner)/\(.[0].repo)/compare/\($range))" ' diff --git a/update.sh b/update.sh index e916745..f670812 100755 --- a/update.sh +++ b/update.sh @@ -6,29 +6,10 @@ EURYDICE_BRANCH="${EURYDICE_BRANCH:-main}" LIBCRUX_BRANCH="${LIBCRUX_BRANCH:-main}" BERTIE_BRANCH="${BERTE_BRANCH:-main}" -# update `flake.lock` +# Update `flake.lock` nix flake update \ --override-input hax "github:hacspec/hax?ref=$HAX_BRANCH" \ --override-input charon "github:aeneasverif/charon?ref=$CHARON_BRANCH" \ --override-input eurydice "github:aeneasverif/eurydice?ref=$EURYDICE_BRANCH" \ --override-input libcrux "github:cryspen/libcrux?ref=$LIBCRUX_BRANCH" \ --override-input bertie "github:cryspen/bertie?ref=$BERTIE_BRANCH" - -# update `STATUS.txt` -check () { - echo "##[group]$1" - STATUS=$(nix build -L --no-link ".#$1" && echo ✅ || echo ❌) - echo "##[endgroup]" - echo "$STATUS $1 ($2)" >> STATUS.txt -} -rm -f STATUS.txt -check "hax" "$HAX_BRANCH" -check "charon" "$CHARON_BRANCH" -check "eurydice" "$EURYDICE_BRANCH" -check "ml-kem" "$LIBCRUX_BRANCH" -check "bertie" "$BERTIE_BRANCH" - -if ! cat STATUS.txt | grep -q ❌ -then - cp flake.lock good.lock -fi