Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add possibility to release without running any tests #1852

Merged
merged 4 commits into from
Dec 29, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
@@ -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 }}
34 changes: 18 additions & 16 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
name: Ubuntu CI (push and/or release)

on:
release:
types: [created]
push:
branches:
- develop
Expand All @@ -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:

Expand Down Expand Up @@ -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}}
Expand All @@ -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"
Expand All @@ -155,15 +158,15 @@ 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}}
batch-name: valid-v830
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}}
Expand All @@ -172,39 +175,39 @@ 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}}
batch-name: valid-v860
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}}
batch-name: valid-v870
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}}
batch-name: short-tests
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}}
batch-name: valid-mps
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}}
Expand Down Expand Up @@ -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/[email protected]
Expand Down