Skip to content

Commit f04990d

Browse files
committed
Upload artifacts in CI pipeline
1 parent 7cd5391 commit f04990d

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/build.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,11 +28,14 @@ jobs:
2828

2929
steps:
3030
- uses: actions/checkout@v2
31+
with:
32+
fetch-depth: 0
33+
fetch-tags: true
3134

3235
- name: Configure CMake
3336
# Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
3437
# See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
35-
run: cmake -B ${{github.workspace}}/build -G "${{matrix.config.generator}}" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DARMIPS_USE_STD_FILESYSTEM=ON
38+
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
3639
env:
3740
CC: ${{matrix.config.cc}}
3841
CXX: ${{matrix.config.cxx}}
@@ -47,3 +50,15 @@ jobs:
4750
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
4851
run: ctest -C ${{env.BUILD_TYPE}} --output-on-failure
4952

53+
- name: Install
54+
run: |
55+
cmake --build ${{github.workspace}}/build --config ${{env.BUILD_TYPE}} --target install
56+
VERSION=$(git -C ${{github.workspace}} describe --first-parent)
57+
PLATFORM=$(echo ${{matrix.config.name}} | tr '[:upper:]' '[:lower:'] | sed 's/ /_/g')
58+
echo "FILENAME=armips_$VERSION_$PLATFORM" >> $GITHUB_ENV
59+
60+
- name: Upload
61+
uses: actions/upload-artifact@v4
62+
with:
63+
name: ${{env.FILENAME}}
64+
path: ${{github.workspace}}/install

0 commit comments

Comments
 (0)