-
Notifications
You must be signed in to change notification settings - Fork 0
51 lines (40 loc) · 1.38 KB
/
ci.yml
File metadata and controls
51 lines (40 loc) · 1.38 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build MinIO test image
run: docker build -t s3cpp-minio:latest .
- name: Start MinIO server
run: |
docker run -d -p 9000:9000 -p 9001:9001 \
-e "MINIO_ROOT_USER=minio_access" \
-e "MINIO_ROOT_PASSWORD=minio_secret" \
--name minio-server \
s3cpp-minio:latest \
server /data --console-address ":9001"
timeout 30 bash -c 'until curl -f http://localhost:9000/minio/health/live 2>/dev/null; do sleep 1; done'
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install -y software-properties-common
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update
sudo apt-get install -y cmake libcurl4-openssl-dev gcc-14 g++-14
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-14 100
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-14 100
- name: Configure CMake
run: cmake -B build -DCMAKE_BUILD_TYPE=Release
- name: Build
run: cmake --build build/
- name: Run tests
run: ./build/tests
- name: Stop MinIO server
if: always()
run: docker stop minio-server