From f04990d4f14c988a2a2d1168e9b177760cc59bf5 Mon Sep 17 00:00:00 2001 From: Kingcom Date: Sat, 11 Jan 2025 22:21:21 +0100 Subject: [PATCH] Upload artifacts in CI pipeline --- .github/workflows/build.yml | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 2bdbac67..394e3ea0 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -28,11 +28,14 @@ jobs: steps: - uses: actions/checkout@v2 + with: + fetch-depth: 0 + fetch-tags: true - name: Configure CMake # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type - run: cmake -B ${{github.workspace}}/build -G "${{matrix.config.generator}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARMIPS_USE_STD_FILESYSTEM=ON + run: cmake -B ${{github.workspace}}/build -G "${{matrix.config.generator}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARMIPS_USE_STD_FILESYSTEM=ON -DCMAKE_INSTALL_PREFIX=${{github.workspace}}/install env: CC: ${{matrix.config.cc}} CXX: ${{matrix.config.cxx}} @@ -47,3 +50,15 @@ jobs: # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure + - name: Install + run: | + cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install + VERSION=$(git -C ${{github.workspace}} describe --first-parent) + PLATFORM=$(echo ${{matrix.config.name}} | tr '[:upper:]' '[:lower:'] | sed 's/ /_/g') + echo "FILENAME=armips_$VERSION_$PLATFORM" >> $GITHUB_ENV + + - name: Upload + uses: actions/upload-artifact@v4 + with: + name: ${{env.FILENAME}} + path: ${{github.workspace}}/install