diff --git a/.github/workflows/new_release.yml b/.github/workflows/new_release.yml new file mode 100644 index 0000000000..af9189e30d --- /dev/null +++ b/.github/workflows/new_release.yml @@ -0,0 +1,38 @@ +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: "Run all tests (true/false)" + required: true +jobs: + release: + runs-on: ubuntu-20.04 + 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 + + + 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 16a3eb3f5a..84cf650be0 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_PUSH: ${{ github.event_name == 'push' }} - RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || github.event_name == 'release' }} + IS_RELEASE: ${{ github.event_name == 'workflow_call' }} + RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests }} + RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests }} jobs: @@ -119,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}} @@ -128,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" @@ -155,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}} @@ -163,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}} @@ -172,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}} @@ -180,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}} @@ -188,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}} @@ -196,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}} @@ -204,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}} @@ -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