Commit Graph

48 Commits

Author SHA1 Message Date
Matthew Brecknell 81423c2200 ci: temporarily remove mcs-export from proof-deploy
This removes the mcs-export matrix job from the proof-deploy workflow,
as the first step towards solving seL4/l4v#497. This should unblock
verification manifest deployments.

The mcs-export job was added to the proof-deploy workflow to perform
SimplExportAndRefine for binary verification targets. It took a short
cut, using the master branch of l4v to perform SimplExportAndRefine for
MCS configurations, since there were no differences between rt and
master that were relevant to SimplExportAndRefine. This is no longer the
case, because MCS seL4 C code now contains C parser annotations that use
symbols only available in the rt branch of l4v.

We intend to add an equivalent job that uses the rt branch of l4v for
MCS SimplExportAndRefine, but are still working out the best way to do
that.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-07-06 18:58:04 +10:00
Gerwin Klein b1370585fe github: provide auth token for gitlint check
Missed one in c4fe1abb3d

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 0b023a4fc1 aarch64 github: provide repo token and cache
The repo token allows the action to work on a private repo, and
the S3 cache bucket name allows it to charge a different org.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein d98d3ea703 github: enable standard checks on aarch64 branch
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein c3900ced40 github: add AARCH64 to build matrix
This commit will only come into full effect when it is merged into
master, which is also the time AARCH64 tests should run regularly
in the main repository.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 8aefcddb37 github: separate workflow file for AARCH64
This is a separate workflow instead of being added to `proof.yml` so
that it can be switched on/off separately.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-20 09:16:19 +10:00
Gerwin Klein 82434f0d62 trivial: fix typo
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-04-08 10:59:05 +10:00
Matthew Brecknell d62eb31f9d ci binary: wait for artifacts
The previous version of the `binary` workflow assumed that its input
artifacts would be available for download before a `binary` workflow run
is started. However, the `binary` workflow typically wants to download
those artifacts from the same workflow run that triggered the `binary`
run via `repository_dispatch`.

It appears that GitHub Actions does not make artifacts available for
download from a workflow until *after* the relevant job has finished.
Hence, there's a race between the `binary` workflow and the workflow
that triggered it. We resolve this by making the `binary` workflow retry
its artifact download for up to 10 minutes.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-04-01 19:17:37 +11:00
Matthew Brecknell 2a173ba189 ci binary: download artifacts from correct repo
The previous version was erroneously downloading artifacts from the repo
in which the `binary` workflow was triggered, when it should have been
downloading from the repo identified by the payload of the trigger.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-04-01 19:17:37 +11:00
Gerwin Klein bf432bb631 github: changed AutoCorresSEL4 default
ci-actions/aws-proofs no longer excludes the AutoCorresSEL4 session by
default, so we no longer need to provide a fake argument to the session
parameter to not exclude it.

This is significant, because we now want the default to be non-verbose
since we're running multiple sessions in parallel.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-03-30 10:27:25 +11:00
Matthew Brecknell 590031439a ci: add binary verification workflow
- Add a new workflow to prepare graph-refine inputs and submit them to a
  back end over SSH. Intended to be triggered by the proof-deploy
  workflow. Fetches C graph-lang artifacts from the triggering workflow,
  and runs the decompiler to generate ASM graph-lang.
- Add a job to the l4v-proof workflow to trigger the decompilation
  workflow.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-03-23 11:53:28 +11:00
Matthew Brecknell bda2c35862 ci proof-deploy: reorganise c-graph-lang artifacts
Combine all C graph-lang outputs into a single artifact, to simplify
downstream workflows.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-03-23 11:53:28 +11:00
Matthew Brecknell 6673bf03d4 ci proof-deploy: add MCS C graph export
Add a second matrix job that runs SimplExportAndRefine for MCS C kernel
configurations that support it (currently ARM and RISCV64).

Note that this uses the master branch of l4v to generate the CSpec, and
to run SimplExportAndRefine, not the rt branch. This works because the
rt branch does not yet connect to the CSpec, and there are no meaningful
differences between rt and master in CSpec or SimplExportAndRefine. For
now, this simplifies workflows for binary verification. But when MCS
proofs connect to the CSpec, this will need to be refactored to use the
rt branch.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-03-14 11:13:47 +11:00
Matthew Brecknell da3c480cd4 ci proof-deploy: save C graph-lang
Upload an artifact for any C graph-lang generated by
SimplExportAndRefine during a proof-deploy workflow.

Signed-off-by: Matthew Brecknell <matt@kry10.com>
2022-03-14 11:13:47 +11:00
Gerwin Klein c4fe1abb3d github: provide auth tokens
These allow the test to run on private repos. If set to empty, they
have no effect.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-02-02 09:25:58 +11:00
Gerwin Klein a4c80a6887 github: use PR number to distinguish pull requests
${{github.ref}} will resolve to the base branch of the PR, not the
PR branch, so it is not useful for distinguishing PRs. The pull request
number will do the job.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-02-01 14:49:38 +11:00
Gerwin Klein d831ddea67 github: run AWS proofs only on most recent push
By default GitHub spawns a new test for each push event. To avoid
hitting the maximum number of AWS instances too quickly, we run the PR
and master proof tests only on the most recent push since the last test
finished.

The concurrency exclusion is per git ref, i.e. separate PRs and
separate branches still run tests concurrently.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2022-01-11 18:20:45 +11:00
Gerwin Klein 8678153429 github: explicit isa branch no longer necessary
The default test setup now uses the correct branch from devel.xml
in the verification-manifest repo.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-09-30 16:53:17 +10:00
Gerwin Klein 349309ebf5 github: trigger proof run on manifest update
The repository_dispatch event will be generated in the
verification-manifest repo when devel.xml is updated by anyone other
than the seL4-ci user.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-18 10:44:48 +10:00
Gerwin Klein 944df7055b github: no PR proof run for text file updates
Save some CI cycles by not running the full proofs for each
documentation update.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-16 21:55:00 +10:00
Gerwin Klein 100cf0c281 github: run push-checks on rt branch as well
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-14 15:59:10 +10:00
Gerwin Klein 3c1f9a8f58
github: deploy manifest after test on master (#323)
This refactors the proof runs into a separate run for the master branch
(which has deployment) and development branches (currently RT and PRs).

For the test on the master branch, we need to make sure that all tests
and the deployment action see the same revisions of all participating
repos.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-08-12 09:09:32 +10:00
Gerwin Klein bd844fbfff github: scheduled external + weekly clean proofs
External means default.xml and vanilla Isabelle instead of internal TS
Isabelle and devel.xml.

The weekly clean test runs without reading the proof image cache,
writing back a fresh cache state.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-31 08:57:50 +10:00
Gerwin Klein d8699b0222 github: provide pull request head
Easier to provide at the call site than trying to extract it from within
the GitHub action.

Signed-off-by: Gerwin Klein <kleing@unsw.edu.au>
2021-07-14 19:25:00 +10:00
Gerwin Klein 106cf5ac03 github: add artifact log upload
This makes the full low-level logs available in the "Artifacts" tab of
the "Actions" screen.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Gerwin Klein 90d5de3ea4 github: complete "switch proof runs to AWS"
This completes the previous commit to run all proof tests on reasonably
high-powered AWS VMs instead of GitHub runners. All tests run in one
go for efficiency.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-13 21:28:21 +10:00
Gerwin Klein d51908d195 github: switch proof runs to AWS
Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-12 15:18:04 +10:00
Gerwin Klein 5f0f373a0e auto-deploy CParser docker container
This action triggers docker container deployment in the repo
seL4/ci-actions when the C parser changes here.

Signed-off-by: Gerwin Klein <gerwin.klein@proofcraft.systems>
2021-07-08 09:23:32 +10:00
Gerwin Klein 9248a64b77 thylint: ignore annotation errors
The annotation action only works for in-repo pull requests. This flag
ignores any errors from this action so that forked pull requests don't
get spurious test failures.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-01-13 17:05:31 +11:00
Gerwin Klein 66d03fec4d github: add thylint action
This github action checks PRs for unwanted outer syntax commands like
`sorry`, `sledgehammer`, or `thm`. The check is non-required, so can be
ignored for those cases where the command is wanted after all.

In addition to console output, the action annotates the sources in the
"changed files" tab. This only works for PRs from within the same repo,
unfortunately (forks have insufficient rights for annotations)

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2021-01-08 18:39:34 +11:00
Gerwin Klein 0c275ddad0 github: remove Refine sessions from github CI
With Isabelle2020 the Refine sessions are too close to memory
boundaries on github runners, the tests randomly fail with out-of-store
exceptions in polyml (but also randomly succeed without change).

Removing the session here until we have a better solution.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-11-26 09:47:52 +11:00
Robert Sison 98c2889f1b lib: A tutorial and some 'modify' monad rules for Lib.EquivValid
Thanks to Toby Murray (@tobycmurray) for early feedback.

Signed-off-by: Robert Sison <robert.sison@unimelb.edu.au>
2020-11-17 06:06:03 +11:00
Gerwin Klein 69a8d9d6b2 github: session ASpecDoc is now merged with ASpec
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Gerwin Klein ee8c6a6404 github: fix Isabelle2020 version for now
This commit ignores the Isabelle version set in the repo manifest and fixes
Isabelle2020 instead for github CI checks. The main purpose is to test this
function and to make sure the test can remain working while the repo manifest
is being updated.

After that has happened, this commit can be reverted.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-10-27 15:52:31 +10:00
Gerwin Klein b8881bbf9b github: add more test sessions for master branch
These are not complete yet, but should be manageable by
github CI runners.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-09-10 16:09:38 +08:00
Gerwin Klein 5857efd15f github: cache ~/.stack contents
It'd be nice to check for actual *.cabal changes, but the cache
action doesn't have access to the repo checkout yet.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-09-10 16:09:38 +08:00
Gerwin Klein e26ffb8c14 github: add remaining MCS tests
This manually adds the HaskellKernel compile test, ASpecDoc, and
tests-xml-correct sessions, which together with the existing tests make
up the entire current MCS test suite apart from "Licenses" which is
already covered by other github CI.

This is a bit ad-hoc, ideally there should be a default "rest" session
to capture tests that will be added in the future. This will need a bit
of restructure in the CI action itself, though, so is postponed for now.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-09-10 16:09:38 +08:00
Gerwin Klein 2845f9904e github: also test Refine session
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-08-10 15:48:34 +08:00
Gerwin Klein 7ba6422142 github: run on all PRs, and on push to {master, rt}
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-08-10 15:48:34 +08:00
Gerwin Klein 9f6b6c243e github: cache Isabelle images
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-08-10 15:48:34 +08:00
Gerwin Klein 963a3cca75 github: use standardised seL4 actions
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-08-10 15:48:34 +08:00
Gerwin Klein 9c837e81d0 github: PR checks on AInvs for rt branch
Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-08-10 15:48:34 +08:00
Gerwin Klein c53cb66869 github: use sha for head reference in gitlint
The branch name of the pull request doesn't necessarily exist in the
origin repo if the pull request is from a fork. Using the hash directly
should be more reliable.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-20 12:06:13 +08:00
Gerwin Klein 106cd6d41b github: gitlint workflow now more general
Now contains gitlint and whitespace check. Renamed accordingly.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-20 11:48:17 +08:00
Gerwin Klein 0af1b8b912 github: check for trailing whitespace and conflict markers
The check runs `git diff --check $base_ref`, which has non-zero
error code if either trailing whitespace or conflict markers are
present.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-20 11:48:02 +08:00
Gerwin Klein 1dc30da470 Run style check from within checked repository
This is to make sure that the .stylefilter file is applied.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 13:53:59 +08:00
Gerwin Klein 1d46f2aafd github: don't attempt to follow into isabelle repo
When the license check runs, the `l4v` repo is not necessarily
in the full `repo` context, i.e. the `isabelle` link is dangling.

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 12:48:43 +08:00
Gerwin Klein a5e6138361 github: CI actions for simple checks
This commit adds github workflow actions for a few simple checks from
the main regression test suite to give instant automatic feedback on
github pull requests. Specifically, it adds the following checks:

  - sel4_tools style
  - sel4_tools shell scripts
  - gitlint
  - `reuse` SPDX license check

Signed-off-by: Gerwin Klein <gerwin.klein@data61.csiro.au>
2020-04-19 11:28:26 +08:00