Skip to content

Commit 04a9c37

Browse files
committed
Update cmake.yml
1 parent 549b1cc commit 04a9c37

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

.github/workflows/cmake.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ on:
1818

1919
jobs:
2020
cmake_build:
21-
runs-on: ubuntu-latest
22-
23-
container:
24-
image: centos:8
25-
options: --privileged
21+
runs-on: ubuntu-18.04
2622

2723
strategy:
2824
# Set fail-fast to false to ensure that feedback is delivered for all matrix combinations. Consider changing this to true when your workflow is stable.
@@ -35,22 +31,15 @@ jobs:
3531
#
3632
# To add more build types (Release, Debug, RelWithDebInfo, etc.) customize the build_type list.
3733
matrix:
38-
os: [centos-8]
34+
os: [ubuntu-18.04]
3935
build_type: ${{ fromJSON(format('[{0}]', inputs.build_type || '"Debug","Release"')) }}
4036
c_compiler: [clang]
4137
cpp_compiler: [clang++]
4238

4339
steps:
4440
- uses: actions/checkout@v4
45-
46-
- name: Install Clang and Dependencies
47-
run: |
48-
yum -y update
49-
yum -y install epel-release
50-
yum -y install clang llvm-toolset-7 cmake make gcc-c++ git which tar
51-
ln -sf /usr/bin/clang /usr/local/bin/clang
52-
ln -sf /usr/bin/clang++ /usr/local/bin/clang++
53-
ln -sf /usr/bin/cmake /usr/local/bin/cmake
41+
with:
42+
submodules: true
5443

5544
- name: Set reusable strings
5645
# Turn repeated input strings (such as the build output directory) into step outputs. These step outputs can be used throughout the workflow file.
@@ -59,6 +48,11 @@ jobs:
5948
run: |
6049
echo "build-output-dir=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
6150
51+
- name: Install Clang and Libraries
52+
run: |
53+
sudo apt-get update
54+
sudo apt-get install -y clang libc++-dev libc++abi-dev
55+
6256
- name: Check Clang Settings
6357
run: |
6458
clang --version
@@ -82,6 +76,12 @@ jobs:
8276
# Build your program with the given configuration. Note that --config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
8377
run: cmake --build ${{ steps.strings.outputs.build-output-dir }} --config ${{ matrix.build_type }} --verbose
8478

79+
- name: Test
80+
working-directory: ${{ steps.strings.outputs.build-output-dir }}
81+
# Execute tests defined by the CMake configuration. Note that --build-config is needed because the default Windows generator is a multi-config generator (Visual Studio generator).
82+
# See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
83+
run: ctest --build-config ${{ matrix.build_type }} --verbose --output-on-failure
84+
8585
- name: Package Build Artifacts
8686
run: |
8787
mkdir -p ${{ steps.strings.outputs.build-output-dir }}/package

0 commit comments

Comments
 (0)