From 06836c773ad67df2f48dce21e7d56e16e8e93b87 Mon Sep 17 00:00:00 2001 From: Jason Gross Date: Thu, 19 Oct 2023 10:38:07 -0700 Subject: [PATCH] Merge docker workflow into ci.yml --- .github/workflows/ci-dev.yml | 56 ------------------------------------ .github/workflows/ci.yml | 39 +++++++++++++++++++++++-- 2 files changed, 37 insertions(+), 58 deletions(-) delete mode 100644 .github/workflows/ci-dev.yml diff --git a/.github/workflows/ci-dev.yml b/.github/workflows/ci-dev.yml deleted file mode 100644 index ae743fe0..00000000 --- a/.github/workflows/ci-dev.yml +++ /dev/null @@ -1,56 +0,0 @@ -# This workflow will install Python dependencies, run tests and lint with a variety of Python versions -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions - -name: CI (docker) - -on: - push: - branches: [ master ] - pull_request: - branches: [ master ] - workflow_dispatch: - schedule: - - cron: '0 0 * * *' - -jobs: - build: - - strategy: - fail-fast: false - matrix: - coq-version: ['dev', '8.15', '8.14', '8.13', '8.12', '8.11', '8.10', '8.9', '8.8', '8.7', '8.6', '8.5', '8.4'] - ocaml-version: ['default'] - - runs-on: ubuntu-latest - concurrency: - group: ${{ github.workflow }}-${{ matrix.coq-version }}-${{ matrix.ocaml-version }}-${{ github.head_ref || github.run_id }} - cancel-in-progress: true - - steps: - - uses: actions/checkout@v4 - - uses: coq-community/docker-coq-action@v1 - with: - coq_version: ${{ matrix.coq-version }} - ocaml_version: ${{ matrix.ocaml-version }} - custom_script: | - sudo chmod -R a+rw . - echo '::group::install general dependencies' - sudo apt-get update -y - sudo apt-get install -y python3 - eval $(opam env) - echo '::endgroup::' - echo '::group::make print-support' - make print-support PYTHON=python3 - echo '::endgroup::' - make check PYTHON=python3 CAT_ALL_LOGS=1 - - - check-all-docker: - runs-on: ubuntu-latest - needs: build - if: always() - steps: - - run: echo 'The triggering workflow passed' - if: ${{ needs.build.result == 'success' }} - - run: echo 'The triggering workflow failed' && false - if: ${{ needs.build.result != 'success' }} diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c6441f07..6fea9ff9 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -49,7 +49,7 @@ jobs: python -m pip install --upgrade pip - name: Lint with flake8 run: | - pip install flake8 + python -m pip install flake8 # stop the build if there are Python syntax errors or undefined names flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide @@ -60,13 +60,48 @@ jobs: - name: Test run: make print-support && make has-all-tests && make check PYTHON=python CAT_ALL_LOGS=1 + docker-build: + strategy: + fail-fast: false + matrix: + coq-version: ['dev', '8.18', '8.17', '8.16', '8.15', '8.14', '8.13', '8.12', '8.11', '8.10', '8.9', '8.8', '8.7', '8.6', '8.5', '8.4'] + ocaml-version: ['default'] + + runs-on: ubuntu-latest + concurrency: + group: ${{ github.workflow }}-${{ matrix.coq-version }}-${{ matrix.ocaml-version }}-${{ github.head_ref || github.run_id }} + cancel-in-progress: true + + steps: + - uses: actions/checkout@v4 + - uses: coq-community/docker-coq-action@v1 + with: + coq_version: ${{ matrix.coq-version }} + ocaml_version: ${{ matrix.ocaml-version }} + custom_script: | + sudo chmod -R a=u . + # Work around https://github.com/actions/checkout/issues/766 + git config --global --add safe.directory "*" + startGroup 'install general dependencies' + sudo apt-get update -y + sudo apt-get install -y python3 + eval $(opam env) + endGroup + startGroup 'make print-support' + make print-support PYTHON=python3 + endGroup + make check PYTHON=python3 CAT_ALL_LOGS=1 check-all: runs-on: ubuntu-latest - needs: build + needs: [docker-build, build] if: always() steps: - run: echo 'The triggering workflow passed' if: ${{ needs.build.result == 'success' }} - run: echo 'The triggering workflow failed' && false if: ${{ needs.build.result != 'success' }} + - run: echo 'The triggering workflow passed (docker)' + if: ${{ needs.docker-build.result == 'success' }} + - run: echo 'The triggering workflow failed (docker)' && false + if: ${{ needs.docker-build.result != 'success' }}