Skip to content

Commit a4e9a60

Browse files
anarthalmzimbres
authored andcommitted
Removed external service
1 parent e9b16a3 commit a4e9a60

File tree

2 files changed

+25
-44
lines changed

2 files changed

+25
-44
lines changed

.github/workflows/ci.yml

Lines changed: 19 additions & 44 deletions
Original file line numberDiff line numberDiff line change
@@ -128,27 +128,6 @@ jobs:
128128
--cxxstd 17,20 \
129129
--variant debug,release
130130
131-
build-redis-container:
132-
name: Build Redis container
133-
runs-on: ubuntu-latest
134-
steps:
135-
- name: Checkout
136-
uses: actions/checkout@v4
137-
138-
- name: Log in to the Container registry
139-
uses: docker/login-action@v2
140-
with:
141-
registry: ghcr.io
142-
username: ${{ github.actor }}
143-
password: ${{ secrets.GITHUB_TOKEN }}
144-
145-
- name: Build and push
146-
uses: docker/build-push-action@v4
147-
with:
148-
context: tools
149-
push: true
150-
tags: ghcr.io/${{ github.repository }}:latest
151-
152131
posix-cmake:
153132
name: "CMake ${{ matrix.toolset }} ${{ matrix.cxxstd }} ${{ matrix.build-type }} ${{ matrix.cxxflags }}"
154133
needs: build-redis-container
@@ -227,22 +206,26 @@ jobs:
227206
ldflags: '-lc++'
228207

229208
runs-on: ${{ matrix.os }}
230-
container: ${{matrix.container}}
209+
# container: ${{matrix.container}}
231210
env:
232211
CXXFLAGS: ${{matrix.cxxflags}} -Wall -Wextra
233212
LDFLAGS: ${{matrix.ldflags}}
234213
CMAKE_BUILD_PARALLEL_LEVEL: 4
235214
BOOST_REDIS_TEST_SERVER: redis
236215

237-
services:
238-
redis:
239-
image: ghcr.io/${{ github.repository }}:latest
240-
241216
steps:
217+
- name: Checkout
218+
uses: actions/checkout@v4
219+
220+
- name: Set up the required containers
221+
run: |
222+
cd tools
223+
docker compose up -d --wait || (docker compose logs; exit 1)
224+
242225
- name: Install dependencies
243226
run: |
244-
apt-get update
245-
apt-get -y --no-install-recommends install \
227+
docker exec -it builder apt-get update
228+
docker exec -it builder apt-get -y --no-install-recommends install \
246229
git \
247230
libssl-dev \
248231
make \
@@ -251,59 +234,51 @@ jobs:
251234
protobuf-compiler \
252235
python3 \
253236
${{ matrix.install }}
254-
255-
- name: Checkout
256-
uses: actions/checkout@v4
257-
258-
- name: Set up a Redis server
259-
run: |
260-
cd tools
261-
docker compose up -d --wait || (docker compose logs; exit 1)
262237
263238
- name: Setup Boost
264-
run: ./tools/ci.py setup-boost --source-dir=$(pwd)
239+
run: docker exec -it builder /boost-redis/tools/ci.py setup-boost --source-dir=/boost-redis
265240

266241
- name: Build a Boost distribution using B2
267242
run: |
268-
./tools/ci.py build-b2-distro \
243+
docker exec -it builder /boost-redis/tools/ci.py build-b2-distro \
269244
--toolset ${{ matrix.toolset }}
270245
271246
- name: Build a Boost distribution using CMake
272247
run: |
273-
./tools/ci.py build-cmake-distro \
248+
docker exec -it builder /boost-redis/tools/ci.py build-cmake-distro \
274249
--build-type ${{ matrix.build-type }} \
275250
--cxxstd ${{ matrix.cxxstd }} \
276251
--toolset ${{ matrix.toolset }}
277252
278253
- name: Build the project tests
279254
run: |
280-
./tools/ci.py build-cmake-standalone-tests \
255+
docker exec -it builder /boost-redis/tools/ci.py build-cmake-standalone-tests \
281256
--build-type ${{ matrix.build-type }} \
282257
--cxxstd ${{ matrix.cxxstd }} \
283258
--toolset ${{ matrix.toolset }}
284259
285260
- name: Run the project tests
286261
run: |
287-
./tools/ci.py run-cmake-standalone-tests \
262+
docker exec -it builder /boost-redis/tools/ci.py run-cmake-standalone-tests \
288263
--build-type ${{ matrix.build-type }}
289264
290265
- name: Run add_subdirectory tests
291266
run: |
292-
./tools/ci.py run-cmake-add-subdirectory-tests \
267+
docker exec -it builder /boost-redis/tools/ci.py run-cmake-add-subdirectory-tests \
293268
--build-type ${{ matrix.build-type }} \
294269
--cxxstd ${{ matrix.cxxstd }} \
295270
--toolset ${{ matrix.toolset }}
296271
297272
- name: Run find_package tests with the built cmake distribution
298273
run: |
299-
./tools/ci.py run-cmake-find-package-tests \
274+
docker exec -it builder /boost-redis/tools/ci.py run-cmake-find-package-tests \
300275
--build-type ${{ matrix.build-type }} \
301276
--cxxstd ${{ matrix.cxxstd }} \
302277
--toolset ${{ matrix.toolset }}
303278
304279
- name: Run find_package tests with the built b2 distribution
305280
run: |
306-
./tools/ci.py run-cmake-b2-find-package-tests \
281+
docker exec -it builder /boost-redis/tools/ci.py run-cmake-b2-find-package-tests \
307282
--build-type ${{ matrix.build-type }} \
308283
--cxxstd ${{ matrix.cxxstd }} \
309284
--toolset ${{ matrix.toolset }}

tools/docker-compose.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,9 @@ services:
44
ports:
55
- 6379:6379
66
- 6380:6380
7+
builder:
8+
image: ubuntu:22.04
9+
container_name: builder
10+
tty: true
11+
volumes:
12+
- ./:/boost-redis

0 commit comments

Comments
 (0)