From bcf4fae0aab598a1ae480de06a90291760e9483a Mon Sep 17 00:00:00 2001 From: Nikita Fediuchin Date: Tue, 20 Aug 2024 19:43:26 +0200 Subject: [PATCH] Add workflow build artifacts publishing --- .github/workflows/cmake.yml | 38 +++++++++++++++++++++++++------------ libraries/mpio | 2 +- libraries/mpmt | 2 +- 3 files changed, 28 insertions(+), 14 deletions(-) diff --git a/.github/workflows/cmake.yml b/.github/workflows/cmake.yml index a38b0e3..9f436ff 100644 --- a/.github/workflows/cmake.yml +++ b/.github/workflows/cmake.yml @@ -7,29 +7,29 @@ env: jobs: build: - runs-on: ${{ matrix.os }} + runs-on: ${{matrix.os}} strategy: matrix: os: [ubuntu-latest, macos-latest, windows-latest] steps: - name: Checkout repository - uses: actions/checkout@v3 + uses: actions/checkout@v4 with: submodules: true - - if: matrix.os == 'ubuntu-latest' - name: Install Ubuntu OpenSSL + - name: Install Ubuntu OpenSSL + if: matrix.os == 'ubuntu-latest' run: sudo apt-get update && sudo apt-get install openssl libssl-dev - - if: matrix.os == 'macos-latest' - name: Install macOS OpenSSL + - name: Install macOS OpenSSL + if: matrix.os == 'macos-latest' run: brew update && brew install openssl - - if: matrix.os == 'windows-latest' - name: Install Windows OpenSSL + - name: Install Windows OpenSSL + if: matrix.os == 'windows-latest' run: choco install openssl - - name: Create Build Environment + - name: Create build environment run: cmake -E make_directory ${{runner.workspace}}/build - name: Configure CMake @@ -37,12 +37,26 @@ jobs: working-directory: ${{runner.workspace}}/build run: cmake $GITHUB_WORKSPACE -DCMAKE_BUILD_TYPE=$BUILD_TYPE - - name: Build + - name: Build project working-directory: ${{runner.workspace}}/build shell: bash - run: cmake --build . --config $BUILD_TYPE + run: cmake --build . --config $BUILD_TYPE --parallel - - name: Test + - name: Run tests working-directory: ${{runner.workspace}}/build shell: bash run: ctest -C $BUILD_TYPE + + - name: Archive artifacts + if: startsWith(github.ref, 'refs/tags/') + working-directory: ${{runner.workspace}} + shell: bash + run: 7z a -mx9 ${{github.event.repository.name}}-${{github.ref_name}}-${{runner.os}}-${{runner.arch}}.zip ./build/* + + - name: Release artifacts + if: startsWith(github.ref, 'refs/tags/') + uses: softprops/action-gh-release@v2 + with: + fail_on_unmatched_files: true + generate_release_notes: true + files: ${{runner.workspace}}/*.zip diff --git a/libraries/mpio b/libraries/mpio index 630acd8..29ae2e5 160000 --- a/libraries/mpio +++ b/libraries/mpio @@ -1 +1 @@ -Subproject commit 630acd8ff4dbe8e1c1426ad960f3b10c2851cfa2 +Subproject commit 29ae2e55238cc6a1b4b9289720fba22cea842839 diff --git a/libraries/mpmt b/libraries/mpmt index 23e9492..e566b0f 160000 --- a/libraries/mpmt +++ b/libraries/mpmt @@ -1 +1 @@ -Subproject commit 23e9492dd382bb8e5e6cfa3f3ec320d300dc1021 +Subproject commit e566b0f07dc808035e99b90b1e60e6f0f9a9bee0