|
7 | 7 | branches: [main] |
8 | 8 | workflow_dispatch: {} |
9 | 9 |
|
10 | | -env: |
11 | | - # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) |
12 | | - BUILD_TYPE: Release |
13 | | - |
14 | 10 | jobs: |
15 | 11 | build: |
16 | | - # The CMake configure and build commands are platform agnostic and should work equally |
17 | | - # well on Windows or Mac. You can convert this to a matrix build if you need |
18 | | - # cross-platform coverage. |
19 | | - # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix |
20 | 12 | runs-on: ubuntu-22.04 |
21 | 13 |
|
22 | 14 | steps: |
23 | | - - name: Checkout repository |
24 | | - uses: actions/checkout@v2 |
25 | | - |
26 | | - # - name: Get version |
27 | | - # run: echo "VERSION=$(python ./version.py get -f vcpkg.json)" >> $GITHUB_ENV |
| 15 | + - name: Checkout |
| 16 | + uses: actions/checkout@v4 |
28 | 17 |
|
29 | 18 | - name: Configure CMake |
30 | | - # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make. |
31 | | - # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type |
32 | 19 | run: > |
33 | | - cmake -B ${{ github.workspace }}/build |
34 | | - -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} |
35 | | -
|
36 | | - - name: Install generator |
37 | | - run: | |
38 | | - wget -O gen.zip https://github.com/chocolacula/easy_reflection_cpp/releases/download/3.0.0/er_gen-ubuntu22-x64.zip |
39 | | - unzip gen.zip -d output |
40 | | - chmod +x output/er_gen |
| 20 | + cmake --build ./build/Release |
| 21 | + -DCMAKE_BUILD_TYPE=Release |
41 | 22 |
|
42 | 23 | - name: Build |
43 | | - run: cmake --build ./build -j $(grep -c 'processor' /proc/cpuinfo) -t tests |
| 24 | + run: > |
| 25 | + cmake --build ./build/Release |
| 26 | + -j $(grep -c 'processor' /proc/cpuinfo) |
| 27 | + -t er_gen tests |
44 | 28 |
|
45 | 29 | - name: Test |
46 | | - working-directory: ${{ github.workspace }}/build |
| 30 | + working-directory: ./build/Release |
47 | 31 | run: ctest --rerun-failed --output-on-failure |
0 commit comments