Skip to content

Commit

Permalink
Tests run at the end
Browse files Browse the repository at this point in the history
  • Loading branch information
flomnes committed Nov 21, 2023
1 parent e43c272 commit 47b671c
Show file tree
Hide file tree
Showing 2 changed files with 87 additions and 88 deletions.
97 changes: 48 additions & 49 deletions .github/workflows/ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -103,6 +103,53 @@ jobs:
run: |
cmake --build _build --config release -j2
- name: Installer .deb creation
run: |
cd _build
cpack -G DEB
- name: .tar.gz creation
run: |
cd _build
cpack -G TGZ
- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install
- name: Installer archive upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz

- name: Installer deb upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.deb

publish_assets:
name: Publish assets
needs: build
runs-on: ${{needs.build.outputs.os}}
steps:
- name: Download all artifacts
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", "*/*.deb"]'

# simtest
- name: Read simtest version
Expand Down Expand Up @@ -218,52 +265,4 @@ jobs:
with:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-3
os: ${{ matrix.test-platform }}

- name: Installer .deb creation
run: |
cd _build
cpack -G DEB
- name: .tar.gz creation
run: |
cd _build
cpack -G TGZ
- name: Solver archive creation
run: |
cd _build
cmake --install . --prefix install
pushd .
cd install/bin
tar czf ../../antares-solver_ubuntu20.04.tar.gz antares-*-solver libsirius_solver.so
popd
rm -rf install
- name: Installer archive upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.tar.gz

- name: Installer deb upload push
uses: actions/upload-artifact@v3
with:
path: _build/*.deb

publish_assets:
name: Publish assets
needs: build
runs-on: ${{needs.build.outputs.os}}
steps:
- name: Download all artifacts
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", "*/*.deb"]'
os: ${{ matrix.test-platform }}
78 changes: 39 additions & 39 deletions .github/workflows/windows-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,45 @@ jobs:
shell: bash
run: rm -rf ${{ github.workspace }}/src/_build/_deps

- name: .zip creation
shell: bash
run: |
cd _build
cpack -G ZIP
export ZIP_NAME=$(ls *.zip)
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
- name: Solver archive creation
shell: bash
run: |
cd _build
zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll
- name: NSIS Installer creation
shell: bash
run: |
rm -rf src/tests/resources/Antares_Simulator_Tests
cd _build
cpack -GNSIS
export NSIS_NAME=$(ls *.exe)
echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV
- name: Upload NSIS logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: NSISOutput.log
path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log

- name: Upload release assets
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_build/${{env.NSIS_NAME}}
_build/${{env.ZIP_NAME}}
_build/solver.zip
# simtest
- name: Read simtest version
id: simtest-version
Expand Down Expand Up @@ -164,42 +203,3 @@ jobs:
simtest-tag: ${{steps.simtest-version.outputs.prop}}
batch-name: long-tests-3
os: ${{ matrix.test-platform }}

- name: .zip creation
shell: bash
run: |
cd _build
cpack -G ZIP
export ZIP_NAME=$(ls *.zip)
echo "ZIP_NAME=$ZIP_NAME" >> $GITHUB_ENV
- name: Solver archive creation
shell: bash
run: |
cd _build
zip -r antares-solver_windows.zip solver/Release/antares-*-solver.exe solver/Release/*.dll
- name: NSIS Installer creation
shell: bash
run: |
rm -rf src/tests/resources/Antares_Simulator_Tests
cd _build
cpack -GNSIS
export NSIS_NAME=$(ls *.exe)
echo "NSIS_NAME=$NSIS_NAME" >> $GITHUB_ENV
- name: Upload NSIS logs
if: ${{ failure() }}
uses: actions/upload-artifact@v3
with:
name: NSISOutput.log
path: _build/_CPack_Packages/win64/NSIS/NSISOutput.log

- name: Upload release assets
uses: softprops/[email protected]
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
_build/${{env.NSIS_NAME}}
_build/${{env.ZIP_NAME}}
_build/solver.zip

0 comments on commit 47b671c

Please sign in to comment.