From 7998f3f8b67c60d248a3fee327e22253ce3f90c4 Mon Sep 17 00:00:00 2001 From: 4ever2 <3417013+4ever2@users.noreply.github.com> Date: Fri, 10 Mar 2023 15:12:40 +0100 Subject: [PATCH] Ci refactor (#207) --- .github/dependabot.yml | 9 +++++++++ .github/opam-errors.json | 21 +++++++++++++++++++++ .github/workflows/build.yml | 24 +++++++++++++++++------- .github/workflows/lint-opam.yml | 24 ++++++++++++++++++++++++ 4 files changed, 71 insertions(+), 7 deletions(-) create mode 100644 .github/dependabot.yml create mode 100644 .github/opam-errors.json create mode 100644 .github/workflows/lint-opam.yml diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 00000000..0329b326 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,9 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: "weekly" + day: "monday" + labels: + - "part: dependencies" diff --git a/.github/opam-errors.json b/.github/opam-errors.json new file mode 100644 index 00000000..c3444b10 --- /dev/null +++ b/.github/opam-errors.json @@ -0,0 +1,21 @@ +{ + "problemMatcher": [ + { + "owner": "opam", + "pattern": [ + { + "regexp": "^([^\\s].*): \\x1b\\[[0-9;]*m(Errors|Warnings)\\.\\x1b\\[[0-9;]*m$", + "file": 1, + "kind": "file" + }, + { + "regexp": "^\\s+\\x1b\\[[0-9;]*m(error|warning)\\x1b\\[[0-9;]*m\\s+(\\d+):\\s+(.*)$", + "severity": 1, + "code": 2, + "message": 3, + "loop": true + } + ] + } + ] +} \ No newline at end of file diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index aa049bac..43b7ba39 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -27,7 +27,6 @@ jobs: runs-on: ubuntu-latest permissions: contents: write - pages: write container: image: aucobra/concert:deps-8.16.1-with-compilers options: --user root @@ -128,6 +127,7 @@ jobs: with: name: Liquidity logs path: extraction/tests/extracted-code/liquidity-extract/liquidity.log + retention-days: 14 - name: Prepare extraction results if: github.event_name == 'push' && github.repository == 'AU-COBRA/ConCert' && github.ref == 'refs/heads/master' run: | @@ -148,11 +148,21 @@ jobs: user-email: danil.v.annenkov@gmail.com commit-message: See ORIGIN_COMMIT from $GITHUB_REF target-branch: master - - name: Deploy the documentation to GitHub Pages + - name: Prepare documentation for deployment if: github.event_name == 'push' && github.ref == 'refs/heads/master' - uses: crazy-max/ghaction-github-pages@v3 + uses: actions/upload-pages-artifact@v1 with: - target_branch: gh-pages - build_dir: docs - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + path: docs + deploy-docs: + if: github.event_name == 'push' && github.ref == 'refs/heads/master' + needs: build + runs-on: ubuntu-latest + permissions: + pages: write + id-token: write + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v1 diff --git a/.github/workflows/lint-opam.yml b/.github/workflows/lint-opam.yml new file mode 100644 index 00000000..96f492ea --- /dev/null +++ b/.github/workflows/lint-opam.yml @@ -0,0 +1,24 @@ +name: Lint Opam +on: + pull_request: + paths: + - '**.opam' +permissions: + contents: read +jobs: + lint: + runs-on: ubuntu-latest + steps: + - name: Checkout code + uses: actions/checkout@v3 + - name: Set up opam + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 4.14.x + opam-repositories: | + coq-released: https://coq.inria.fr/opam/released + default: https://opam.ocaml.org + - name: Set up problem matcher + run: echo "::add-matcher::./.github/opam-errors.json" + - name: Lint opam file + run: opam lint