@@ -16,80 +16,46 @@ jobs:
1616 # The CMake configure and build commands are platform-agnostic and should work equally well on Windows or Mac.
1717 # You can convert this to a matrix build if you need cross-platform coverage.
1818 # See: https://docs.github.com/en/free-pro-team@latest/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
19- runs-on : ubuntu-latest
19+ runs-on : ubuntu-22.04
2020
2121 steps :
22- - name : Free Disk Space (Ubuntu Host)
23- run : |
24- sudo rm -rf /usr/share/dotnet
25- sudo rm -rf /usr/local/lib/android
26- sudo rm -rf /opt/ghc
27- sudo rm -rf /opt/hostedtoolcache/CodeQL
28- sudo docker system prune -af
2922 - uses : actions/checkout@v4
3023
31- - name : Set up Go
32- uses : actions/setup-go@v5
33- with :
34- go-version : 1.19
35-
36- - name : ccache
37- uses :
hendrikmuhs/[email protected] 38- with :
39- key : ubuntu-latest
40-
41- - name : Install Deps
24+ - name : Build Docker image
4225 run : |
43- sudo apt-get update
44- sudo apt-get install -y autoconf libprotobuf-dev protobuf-compiler clang-tidy
45-
46- - name : Configure CMake
47- # Configure CMake in a 'build' subdirectory. `CMAKE_BUILD_TYPE` is only required if you are using a single-configuration generator such as make.
48- # See https://cmake.org/cmake/help/latest/variable/CMAKE_BUILD_TYPE.html?highlight=cmake_build_type
49- run : cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS_DEBUG=-fsanitize=address -D CMAKE_C_COMPILER_LAUNCHER=ccache -D CMAKE_CXX_COMPILER_LAUNCHER=ccache
26+ docker build -t pika-ci -f ci/Dockerfile .
5027
51- - name : Build
52- # Build your program with the given configuration
53- run : cmake --build build --config ${{ env.BUILD_TYPE }}
54-
55- - name : Cleanup
28+ - name : Build Pika (inside Docker)
5629 run : |
57- rm -rf ./buildtrees
58-
59- - uses : actions/upload-artifact@v4
60- with :
61- name : ${{ env.ARTIFACT_PIKA_NAME }}
62- path : ${{ github.workspace }}/build/pika
63-
64- - name : Test
65- working-directory : ${{ github.workspace }}/build
66- # Execute tests defined by the CMake configuration.
67- # See https://cmake.org/cmake/help/latest/manual/ctest.1.html for more detail
68- run : ctest -C ${{ env.BUILD_TYPE }}
69-
70- - name : Unit Test
71- working-directory : ${{ github.workspace }}
72- run : ./pikatests.sh all clean
73-
74- # master on port 9221, slave on port 9231, all with 2 db
75- - name : Start codis, pika master and pika slave
76- working-directory : ${{ github.workspace }}/build
30+ docker run --rm \
31+ -v ${{ github.workspace }}:/work \
32+ -w /work \
33+ pika-ci \
34+ bash -c "
35+ rm -rf build buildtrees &&
36+ cmake -B build \
37+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
38+ -DUSE_PIKA_TOOLS=ON &&
39+ cmake --build build -j$(nproc)
40+ "
41+
42+ - name : Run CTest (inside Docker)
7743 run : |
78- chmod +x ../tests/integration/start_master_and_slave.sh
79- ../tests/integration/start_master_and_slave.sh
80- chmod +x ../tests/integration/start_codis.sh
81- ../tests/integration/start_codis.sh
44+ docker run --rm \
45+ -v ${{ github.workspace }}:/work \
46+ -w /work/build \
47+ pika-ci \
48+ ctest --output-on-failure
8249
83- - name : Run Go E2E Tests
84- working-directory : ${{ github.workspace }}/build
50+ - name : Unit Test
8551 run : |
86- cd ../tools/pika_keys_analysis/
87- go test -v ./...
88- cd ../../tests/integration/
89- chmod +x integrate_test.sh
90- sh integrate_test.sh
91-
92- build_on_rocky :
52+ docker run --rm \
53+ -v ${{ github.workspace }}:/work \
54+ -w /work \
55+ pika-ci \
56+ bash -c "./pikatests.sh all clean"
57+
58+ build_on_rocky :
9359 runs-on : ubuntu-latest
9460 container :
9561 image : rockylinux:9
@@ -272,6 +238,7 @@ jobs:
272238 chmod +x integrate_test.sh
273239 sh integrate_test.sh
274240
241+
275242 build_on_macos :
276243
277244 runs-on : macos-14
0 commit comments