-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update upload asset to release: remove deprecated action (#685)
- Loading branch information
1 parent
c67070f
commit 175c4c9
Showing
8 changed files
with
133 additions
and
141 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Centos7 CI (bare docker image) | ||
name: Centos7 release | ||
|
||
on: | ||
push: | ||
|
@@ -16,9 +16,7 @@ env: | |
jobs: | ||
|
||
docker_publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@master | ||
|
@@ -116,7 +114,9 @@ jobs: | |
XPRESSDIR_CONTAINER: ${GITHUB_WORKSPACE}/xpress | ||
XPRESS_CONTAINER: ${GITHUB_WORKSPACE}/xpress/bin | ||
XPRS_LIB_Path_CONTAINER: ${GITHUB_WORKSPACE}/xpress/lib | ||
|
||
outputs: | ||
zip_name: ${{ steps.zip_name.outputs.zip_name }} | ||
singlefile_name: ${{ steps.zip_name.outputs.singlefile_name }} | ||
steps: | ||
- id: branch-name | ||
uses: tj-actions/branch-names@v6 | ||
|
@@ -134,12 +134,12 @@ jobs: | |
os: centos7 | ||
os-full-name: CentOS-7.9.2009 | ||
#variant: -ortools-xpress | ||
|
||
- name: Compile Boost | ||
uses: ./.github/workflows/compile-boost | ||
with: | ||
with: | ||
prefix: "../rte-antares-deps-Release/" | ||
|
||
- name: Install dependencies | ||
run: | | ||
pip3 install -r requirements-tests.txt | ||
|
@@ -191,6 +191,17 @@ jobs: | |
export PATH=/usr/lib64/openmpi/bin:$PATH | ||
cmake3 --build _build --config Release -j2 --target install | ||
- name: Running unit tests | ||
timeout-minutes: 120 | ||
shell: bash | ||
run: | | ||
source /etc/profile.d/modules.sh | ||
module load mpi | ||
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }} | ||
export XPRESS=${{ env.XPRESS_CONTAINER }} | ||
cd _build | ||
ctest3 -C Release --output-on-failure -L "unit|benders|lpnamer|medium" | ||
- name: set name variables | ||
id: single_file_name | ||
shell: bash | ||
|
@@ -210,76 +221,61 @@ jobs: | |
cpack3 -G TGZ -D CPACK_PACKAGE_FILE_NAME=$FILE_NAME | ||
echo "TGZ_NAME=$FILE_NAME.tar.gz" >> $GITHUB_ENV | ||
- name: Installer .rpm creation | ||
run: | | ||
cd _build | ||
export FILE_NAME="antaresXpansion-${{env.VERSION_WITH_XPRESS}}-CentOS-7.9.2009" | ||
cpack3 -G RPM -D CPACK_PACKAGE_FILE_NAME=$FILE_NAME -D CPACK_OUTPUT_FILE_NAME=$FILE_NAME.rpm | ||
echo "RPM_NAME=$FILE_NAME.rpm" >> $GITHUB_ENV | ||
- id: create-single-file | ||
name: Single file .tar.gz creation | ||
uses: ./.github/workflows/single-file-creation-tgz | ||
with: | ||
antares-xpansion-version: ${{env.VERSION_WITH_XPRESS}} | ||
|
||
- name: Upload .tar.gz | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{env.TGZ_NAME}} | ||
path: _build/${{env.TGZ_NAME}} | ||
|
||
- name: Upload rpm | ||
uses: actions/upload-artifact@v3 | ||
- id: create-single-file | ||
name: Single file .tar.gz creation | ||
uses: ./.github/workflows/single-file-creation-tgz | ||
with: | ||
name: ${{env.RPM_NAME}} | ||
path: _build/${{env.RPM_NAME}} | ||
antares-xpansion-version: ${{env.VERSION_WITH_XPRESS}} | ||
|
||
- name: Upload single file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.create-single-file.outputs.archive-name }} | ||
path: ${{ steps.create-single-file.outputs.archive-path }} | ||
|
||
- name: Running unit tests | ||
timeout-minutes: 120 | ||
shell: bash | ||
- id: zip_name | ||
run: | | ||
source /etc/profile.d/modules.sh | ||
module load mpi | ||
export LD_LIBRARY_PATH=LD_LIBRARY_PATH:${{ env.XPRS_LIB_Path_CONTAINER }} | ||
export XPRESS=${{ env.XPRESS_CONTAINER }} | ||
cd _build | ||
ctest3 -C Release --output-on-failure -L "unit|benders|lpnamer|medium" | ||
echo "singlefile_name=${{steps.create-single-file.outputs.archive-name}}" >> "$GITHUB_OUTPUT" | ||
echo "zip_name=${{env.TGZ_NAME}}" >> "$GITHUB_OUTPUT" | ||
####################### | ||
|
||
upload_asset_to_release: | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
runs-on: ubuntu-latest | ||
needs: build | ||
env: | ||
ZIP_NAME: ${{needs.build.outputs.zip_name}} | ||
SINGLEFILE_NAME: ${{needs.build.outputs.singlefile_name}} | ||
steps: | ||
- name: Get release | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
id: get_release | ||
uses: bruceadams/get-release@v1.2.3 | ||
uses: bruceadams/get-release@main | ||
|
||
- name: Publish .tar.gz | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: _build/${{env.TGZ_NAME}} | ||
asset_name: ${{env.TGZ_NAME}} | ||
asset_content_type: application/octet-stream | ||
name: $ZIP_NAME | ||
path: . | ||
|
||
- name: Publish .rpm | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
- name: Download Artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: _build/${{env.RPM_NAME}} | ||
asset_name: ${{env.RPM_NAME}} | ||
asset_content_type: application/octet-stream | ||
name: $SINGLEFILE_NAME | ||
path: . | ||
|
||
- name: Publish single file | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ${{ steps.create-single-file.outputs.archive-path }} | ||
asset_name: ${{ steps.create-single-file.outputs.archive-name }} | ||
asset_content_type: application/octet-stream | ||
- name: Upload Release Asset | ||
env: | ||
GH_REPO: ${{ github.repository }} | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload --repo ${{env.GH_REPO}} ${{ steps.get_release.outputs.tag_name }} $ZIP_NAME | ||
gh release upload --repo ${{env.GH_REPO}} ${{ steps.get_release.outputs.tag_name }} $SINGLEFILE_NAME | ||
######################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Ubuntu CI | ||
name: Ubuntu Release | ||
|
||
on: | ||
push: | ||
|
@@ -186,65 +186,37 @@ jobs: | |
#Cpack command line doesn't seem to care about -P or -R options | ||
echo "TGZ_NAME=$FILE_NAME.tar.gz" >> $GITHUB_ENV | ||
- name: Installer .deb creation | ||
- name: Running unit tests | ||
run: | | ||
cd _build | ||
export FILE_NAME="antaresXpansion-${{env.VERSION_WITH_XPRESS}}-${{ matrix.os }}" | ||
cpack -G DEB -D CPACK_PACKAGE_FILE_NAME=$FILE_NAME | ||
echo "DEB_NAME=$FILE_NAME.deb" >> $GITHUB_ENV | ||
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" | ||
#Uploads are not necessary for release but useful in other cases | ||
- name: Upload .tar.gz | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{env.TGZ_NAME}} | ||
path: _build/${{env.TGZ_NAME}} | ||
|
||
- name: Upload .deb | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{env.DEB_NAME}} | ||
path: _build/${{env.DEB_NAME}} | ||
|
||
- name: Upload single file | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.create-single-file.outputs.archive-name }} | ||
path: ${{ steps.create-single-file.outputs.archive-path }} | ||
|
||
- name: Running unit tests | ||
run: | | ||
cd _build | ||
ctest -C Release --output-on-failure -L "medium|unit|benders|lpnamer" | ||
####################### | ||
|
||
- name: Get release | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
id: get_release | ||
uses: bruceadams/get-release@v1.2.3 | ||
uses: bruceadams/get-release@main | ||
|
||
- name: Publish .tar.gz | ||
- name: Upload Release Asset | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: _build/${{env.TGZ_NAME}} | ||
asset_name: ${{env.TGZ_NAME}} | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Publish .deb | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: _build/${{env.DEB_NAME}} | ||
asset_name: ${{env.DEB_NAME}} | ||
asset_content_type: application/octet-stream | ||
|
||
- name: Publish single file | ||
if: github.event_name == 'release' && github.event.action == 'created' | ||
uses: actions/[email protected] | ||
with: | ||
upload_url: ${{ steps.get_release.outputs.upload_url }} | ||
asset_path: ${{ steps.create-single-file.outputs.archive-path }} | ||
asset_name: ${{ steps.create-single-file.outputs.archive-name }} | ||
asset_content_type: application/octet-stream | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
run: | | ||
gh release upload ${{ steps.get_release.outputs.tag_name }} _build/${{env.TGZ_NAME}} | ||
gh release upload ${{ steps.get_release.outputs.tag_name }} _build/${{env.TGZ_NAME}} | ||
######################## |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.