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

Fix new release GH workflow #1860

Merged
merged 37 commits into from
Jan 11, 2024
Merged
Show file tree
Hide file tree
Changes from 10 commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
5d35523
print output
a-zakir Jan 2, 2024
d9ab701
test gh cli
a-zakir Jan 2, 2024
42a2ff1
test gh upload
a-zakir Jan 2, 2024
72dc932
test
a-zakir Jan 2, 2024
2c3c536
release windows without tests
a-zakir Jan 2, 2024
08917c8
try another shell
a-zakir Jan 2, 2024
12c4059
new centos release
a-zakir Jan 8, 2024
18cd4f9
remove unnecessary option
a-zakir Jan 8, 2024
b17b9e2
all in one job
a-zakir Jan 8, 2024
5ebcd2d
hope
a-zakir Jan 8, 2024
985660b
Merge branch 'develop' into fix/new_release
flomnes Jan 8, 2024
bd7a0c8
install gh
a-zakir Jan 9, 2024
e3d8469
install gh
a-zakir Jan 9, 2024
93c18ba
hew & elastic
a-zakir Jan 10, 2024
4d990aa
cut-off plastic
a-zakir Jan 10, 2024
2562846
yes sir
a-zakir Jan 10, 2024
e812431
disable auto description
a-zakir Jan 10, 2024
534ca67
garbage collector
a-zakir Jan 10, 2024
b6f223d
update
a-zakir Jan 10, 2024
608b73b
::
a-zakir Jan 10, 2024
f0bb324
test
a-zakir Jan 10, 2024
98b41fe
fff
a-zakir Jan 10, 2024
f7d7a85
check env var
a-zakir Jan 10, 2024
42a15b7
...
a-zakir Jan 10, 2024
772bbb9
*
a-zakir Jan 10, 2024
d7bdcf5
"
a-zakir Jan 10, 2024
c1e8225
include UG
a-zakir Jan 10, 2024
3414708
missing file
a-zakir Jan 10, 2024
3bcc2f8
win
a-zakir Jan 10, 2024
d0bc27f
Revert "win"
a-zakir Jan 10, 2024
a711fa6
fix
a-zakir Jan 10, 2024
289de31
Update .github/workflows/build-userguide.yml
a-zakir Jan 11, 2024
c11f5f6
rename job
a-zakir Jan 11, 2024
f6ce5f3
Merge branch 'fix/new_release' of https://github.com/AntaresSimulator…
a-zakir Jan 11, 2024
9a06fe9
pr suggestion
a-zakir Jan 11, 2024
8a6ce6d
fix
a-zakir Jan 11, 2024
bbee780
fix
a-zakir Jan 11, 2024
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
16 changes: 10 additions & 6 deletions .github/workflows/centos7.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
- develop
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_dispatch' }}
IS_PUSH: ${{ github.event_name == 'push' }}

jobs:
Expand Down Expand Up @@ -120,11 +125,10 @@ jobs:
if: ${{ env.IS_RELEASE == 'true' }}
uses: actions/download-artifact@v3


- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["*/*.tar.gz", "*/*.rpm"]'
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" */*.tar.gz */*.rpm
56 changes: 35 additions & 21 deletions .github/workflows/new_release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,26 +13,40 @@ on:
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
release:
name: Release pushed tag
runs-on: ubuntu-20.04
steps:
- name: Create release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release_tag }}
title: ${{ github.event.inputs.release_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$title" \
--generate-notes
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release_tag }}
title: ${{ github.event.inputs.release_name }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$title" \
--generate-notes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
tag: ${{ github.event.inputs.release_tag }}
title: ${{ github.event.inputs.release_name }}
tests: ${{ github.event.inputs.run-tests }}
run: |
gh release create "$tag" \
--repo="$GITHUB_REPOSITORY" \
--title="$title" \
--notes="Run tests: $tests"

The generated notes are garbage since our history is not linear. Also, we want to sort changes by type (new feature, bugfix, doc, code cleaning, etc.)



ubuntu:
name: Release - Ubuntu
needs: release
uses: ./.github/workflows/ubuntu.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

ubuntu:
name: Release - Ubuntu
needs: release
uses: ./.github/workflows/ubuntu.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

windows:
name: Release - Windows
needs: release
uses: ./.github/workflows/windows-vcpkg.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}

centos7:
name: Release - centos7
needs: release
uses: ./.github/workflows/centos7.yml
with:
run-tests: ${{ fromJSON(inputs.run-tests) }}
11 changes: 6 additions & 5 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -276,11 +276,12 @@ jobs:
uses: actions/upload-artifact@v3
with:
path: _build/*.deb



- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
uses: alexellis/[email protected]
env:
GITHUB_TOKEN: ${{ github.token }}
with:
asset_paths: '["_build/*.tar.gz", "_build/*.deb"]'
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.tar.gz _build/*.deb
69 changes: 46 additions & 23 deletions .github/workflows/windows-vcpkg.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,18 @@ 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 == 'workflow_dispatch' }}
RUN_SIMPLE_TESTS: ${{ github.event_name == 'push' || inputs.run-tests == 'true' }}
RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule' || inputs.run-tests == 'true' }}


jobs:
windows:
Expand All @@ -31,7 +43,6 @@ jobs:
VCPKG_ROOT: ${{ github.workspace }}/vcpkg
ORTOOLS_DIR: ${{ github.workspace }}/or-tools
ORTOOLS_URL: "https://github.com/rte-france/or-tools/releases/download/v9.5-rte2.0/ortools_cxx_windows-latest_static_sirius.zip"
RUN_EXTENDED_TESTS: ${{ github.event_name == 'schedule'}}

steps:
- uses: actions/checkout@v3
Expand Down Expand Up @@ -140,13 +151,31 @@ jobs:
shell: bash
run: |
cmake --build _build --config release -j2
# simtest
- name: Read simtest version
id: simtest-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'simtest.json'
prop_path: 'version'

- name: Run named mps tests
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-named-mps
os: ${{ matrix.test-platform }}
variant: "named-mps"

- name: Run unfeasibility-related tests
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.RUN_SIMPLE_TESTS == 'true' }}
run: |
cd _build
ctest -C ${{ matrix.buildtype }} --output-on-failure -L "unit|end-to-end" -LE ortools
Expand All @@ -158,38 +187,25 @@ jobs:
name: MPS-diff
path: ${{ github.workspace }}/src/tests/mps

# simtest
- name: Read simtest version
id: simtest-version
uses: notiz-dev/github-action-json-property@release
with:
path: 'simtest.json'
prop_path: 'version'

- name: Run named mps tests
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: valid-named-mps
os: ${{ matrix.test-platform }}
variant: "named-mps"


- name: Run tests for adequacy patch (CSR)
if: ${{ env.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: adequacy-patch-CSR
os: ${{ matrix.test-platform }}

- name: Run tests about infinity on BCs RHS
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 @@ -198,28 +214,31 @@ jobs:
os: ${{ matrix.test-platform }}

- name: Run tests introduced in v860
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.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.RUN_SIMPLE_TESTS == 'true' }}
uses: ./.github/workflows/run-tests
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
Expand Down Expand Up @@ -299,7 +318,11 @@ jobs:
with:
path: _build/${{env.NSIS_NAME}}

- name: Archive upload
uses: actions/upload-artifact@v3
with:
path: _build/*.zip
- name: Publish assets
if: ${{ env.IS_RELEASE == 'true' }}
env:
GITHUB_TOKEN: ${{ github.token }}
tag: ${{ github.event.inputs.release_tag }}
run: |
gh release upload "$tag" _build/*.zip
shell: bash
Loading