From 7fcdea7cd9a738c3f22aa76b08947b1bfe2774cf Mon Sep 17 00:00:00 2001 From: Florian OMNES <26088210+flomnes@users.noreply.github.com> Date: Tue, 21 Nov 2023 11:48:33 +0100 Subject: [PATCH] Upload assets before running tests --- .github/workflows/ubuntu.yml | 95 ++++++++++++++------------- .github/workflows/windows-release.yml | 80 +++++++++++----------- 2 files changed, 88 insertions(+), 87 deletions(-) diff --git a/.github/workflows/ubuntu.yml b/.github/workflows/ubuntu.yml index fc52b143ca..60f1a716cf 100644 --- a/.github/workflows/ubuntu.yml +++ b/.github/workflows/ubuntu.yml @@ -125,6 +125,54 @@ jobs: name: test-log path: ${{ github.workspace }}/_build/Testing/Temporary/LastTest.log + - 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/upload-assets@0.4.0 + env: + GITHUB_TOKEN: ${{ github.token }} + with: + asset_paths: '["*/*.tar.gz", "*/*.deb"]' + # simtest - name: Read simtest version id: simtest-version @@ -197,50 +245,3 @@ jobs: 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/upload-assets@0.4.0 - env: - GITHUB_TOKEN: ${{ github.token }} - with: - asset_paths: '["*/*.tar.gz", "*/*.deb"]' diff --git a/.github/workflows/windows-release.yml b/.github/workflows/windows-release.yml index 1b00b39e4d..e2de8b546c 100644 --- a/.github/workflows/windows-release.yml +++ b/.github/workflows/windows-release.yml @@ -121,6 +121,46 @@ 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 + rm -rf src/tests/resources/NonRegTests + 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/action-gh-release@v0.1.15 + 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 @@ -163,43 +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 - rm -rf src/tests/resources/NonRegTests - 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/action-gh-release@v0.1.15 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - _build/${{env.NSIS_NAME}} - _build/${{env.ZIP_NAME}} - _build/solver.zip