From 067c64a5a9916626428708d0115e064a84745f7d Mon Sep 17 00:00:00 2001 From: Florian OMNES <26088210+flomnes@users.noreply.github.com> Date: Wed, 27 Dec 2023 17:56:24 +0100 Subject: [PATCH 1/4] Add possibility to release without running extended tests --- .github/workflows/new_release.yml | 31 +++++++++++++++++++++++++++++++ .github/workflows/ubuntu.yml | 12 +++++++----- 2 files changed, 38 insertions(+), 5 deletions(-) create mode 100644 .github/workflows/new_release.yml diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml new file mode 100644 index 0000000000..61c0a698fb --- /dev/null +++ b/.github/workflows/new_release.yml @@ -0,0 +1,31 @@ +name: Create new release + +on: + workflow_dispatch: + inputs: + release_tag: + description: "Release tag" + required: true + release_name: + description: "Release name" + required: true + run_tests: + description: "true/false" + required: true +jobs: + release: + runs-on: ubuntu-latest + outputs: + url: ${{ steps.create_release.outputs.upload_url }} + steps: + - name: Release creation + uses: actions/create-release@v1 + id: create_release + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + tag_name: ${{ github.event.inputs.release_tag }} + release_name: ${{ github.event.inputs.release_name }} + body: | + Please complete description + diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index 16a3eb3f5a..b08f622e5e 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -1,8 +1,6 @@ name: Ubuntu CI (push and/or release) on: - release: - types: [created] push: branches: - develop @@ -14,12 +12,17 @@ on: - doc/* schedule: - cron: '21 2 * * *' + workflow_call: + inputs: + run_tests: + required: true + type: boolean env: GITHUB_TOKEN: ${{ github.token }} - IS_RELEASE: ${{ github.event_name == 'release' && github.event.action == 'created' }} + IS_RELEASE: ${{ github.event_name == 'workflow_call' }} IS_PUSH: ${{ github.event_name == 'push' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || github.event_name == 'release' }} + RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run_tests }} jobs: @@ -291,7 +294,6 @@ jobs: if: ${{ env.IS_RELEASE == 'true' }} uses: actions/download-artifact@v3 - - name: Publish assets if: ${{ env.IS_RELEASE == 'true' }} uses: alexellis/upload-assets@0.4.0 From 55528b4fe0a0ea466c7ac40dcfc500902ea93e3a Mon Sep 17 00:00:00 2001 From: Florian OMNES <26088210+flomnes@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:12:29 +0100 Subject: [PATCH 2/4] Change logic a bit --- .github/workflows/new_release.yml | 11 +++++++++-- .github/workflows/ubuntu.yml | 26 +++++++++++++------------- 2 files changed, 22 insertions(+), 15 deletions(-) diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index 61c0a698fb..30bd7bf3ab 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -9,8 +9,8 @@ on: release_name: description: "Release name" required: true - run_tests: - description: "true/false" + run-tests: + description: "Run all tests (true/false)" required: true jobs: release: @@ -29,3 +29,10 @@ jobs: body: | Please complete description + + ubuntu: + name: Release - Ubuntu + needs: release + uses: ./github/workflows/ubuntu.yml + with: + run-tests: ${{ inputs.run_tests }} diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index b08f622e5e..84cf650be0 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -14,15 +14,15 @@ on: - cron: '21 2 * * *' workflow_call: inputs: - run_tests: + run-tests: required: true type: boolean env: GITHUB_TOKEN: ${{ github.token }} IS_RELEASE: ${{ github.event_name == 'workflow_call' }} - IS_PUSH: ${{ github.event_name == 'push' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run_tests }} + RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests }} + RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests }} jobs: @@ -122,7 +122,7 @@ jobs: - name: Run named mps tests - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -131,13 +131,13 @@ jobs: variant: "named-mps" - name: Run unfeasibility-related tests - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} run: | cd _build ctest -C Release --output-on-failure -R "^unfeasible$" - name: Run unit and end-to-end tests - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} run: | cd _build ctest -C ${{ matrix.buildtype }} --output-on-failure -L "unit|end-to-end" @@ -158,7 +158,7 @@ jobs: path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log - name: Run tests about infinity on BCs RHS - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -166,7 +166,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run MILP with CBC - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -175,7 +175,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run tests introduced in v860 - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -183,7 +183,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run tests introduced in v870 - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -191,7 +191,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run short-tests - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -199,7 +199,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run mps tests - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} @@ -207,7 +207,7 @@ jobs: os: ${{ matrix.test-platform }} - name: Run tests for adequacy patch (CSR) - if: ${{ env.IS_PUSH == 'true' }} + if: ${{ env.RUN_SIMPLE_TESTS == 'true' }} uses: ./.github/workflows/run-tests with: simtest-tag: ${{steps.simtest-version.outputs.prop}} From 51fdb8511a09de8a8ffe8e5b94a3210d88f3f0ec Mon Sep 17 00:00:00 2001 From: Florian OMNES <26088210+flomnes@users.noreply.github.com> Date: Wed, 27 Dec 2023 18:14:40 +0100 Subject: [PATCH 3/4] Add forgotten (but important) dot --- .github/workflows/new_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index 30bd7bf3ab..21e0272ba7 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -33,6 +33,6 @@ jobs: ubuntu: name: Release - Ubuntu needs: release - uses: ./github/workflows/ubuntu.yml + uses: ./.github/workflows/ubuntu.yml with: run-tests: ${{ inputs.run_tests }} From 47a32a5091fa598c87137f1054f8a38b51c6dfcc Mon Sep 17 00:00:00 2001 From: Florian OMNES <26088210+flomnes@users.noreply.github.com> Date: Fri, 29 Dec 2023 14:40:47 +0100 Subject: [PATCH 4/4] Review --- .github/workflows/new_release.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml index 21e0272ba7..af9189e30d 100644 --- a/.github/workflows/new_release.yml +++ b/.github/workflows/new_release.yml @@ -14,7 +14,7 @@ on: required: true jobs: release: - runs-on: ubuntu-latest + runs-on: ubuntu-20.04 outputs: url: ${{ steps.create_release.outputs.upload_url }} steps: