Skip to content

Commit 170ca22

Browse files
minimize ci file
1 parent d8e8811 commit 170ca22

File tree

5 files changed

+15
-324
lines changed

5 files changed

+15
-324
lines changed

.github/ciimage/Dockerfile.archlinux

Lines changed: 0 additions & 32 deletions
This file was deleted.

.github/ciimage/Dockerfile.debian

Lines changed: 0 additions & 39 deletions
This file was deleted.

.github/ciimage/Dockerfile.fedora

Lines changed: 0 additions & 33 deletions
This file was deleted.

.github/ciimage/Dockerfile.ubuntu

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/meson_ci.yml

Lines changed: 15 additions & 189 deletions
Original file line numberDiff line numberDiff line change
@@ -11,204 +11,30 @@ on:
1111
- main
1212

1313
jobs:
14-
build_msvc:
15-
name: Building on MSVC ${{ matrix.msvc_version }}
16-
runs-on: windows-latest
14+
build:
15+
name: Build and Test on ${{ matrix.os }}
16+
runs-on: ${{ matrix.os }}
1717
strategy:
1818
matrix:
19-
msvc_version: [2019, 2022, 2025]
19+
os: [ubuntu-latest, macos-latest, windows-latest]
2020
steps:
2121
- name: Checkout code
22-
uses: actions/checkout@v5
23-
with:
24-
fetch-depth: 0
25-
22+
uses: actions/checkout@v4
2623
- name: Set up Python
27-
uses: actions/setup-python@v6
24+
uses: actions/setup-python@v5
2825
with:
2926
python-version: '3.12'
30-
31-
- name: Install Meson and Ninja
32-
shell: pwsh
33-
run: |
34-
python -m pip install --upgrade pip
35-
python -m pip install meson ninja
36-
if ($env:msvc_version -eq "2019") {
37-
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
38-
} elseif ($env:msvc_version -eq "2022") {
39-
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
40-
} elseif ($env:msvc_version -eq "2025") {
41-
choco install visualstudio2025buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
42-
}
43-
$env:CC="cl.exe"
44-
$env:CXX="cl.exe"
45-
46-
- name: Configure
47-
run: meson setup builddir_msvc_${{ matrix.msvc_version }} --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
48-
49-
- name: Run Tests
50-
run: meson test -C builddir_msvc_${{ matrix.msvc_version }} -v --test-args='show --mode tree --verbose ci --result fail'
51-
52-
build_macosx:
53-
name: Building on MacOSX
54-
runs-on: macos-latest
55-
steps:
56-
- name: Checkout code
57-
uses: actions/checkout@v5
58-
with:
59-
fetch-depth: 0
60-
61-
- name: Set up Python
62-
uses: actions/setup-python@v6
63-
with:
64-
python-version: '3.12'
65-
66-
- name: Install Xcode Command Line Tools
67-
run: |
68-
if ! xcode-select -p &>/dev/null; then
69-
sudo xcode-select --install
70-
until xcode-select -p &>/dev/null; do sleep 5; done
71-
fi
72-
73-
- name: Install Xcode
74-
run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
75-
76-
- name: Install Meson, Ninja
77-
run: |
78-
python -m pip install meson ninja
79-
80-
- name: Configure
81-
run: OBJC=clang OBJCXX=clang++ meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
82-
83-
- name: Compile
84-
run: meson compile -C builddir
85-
27+
- name: Install dependencies
28+
run: python3 -m pip install meson==1.8.0 ninja
29+
- name: Configure Project
30+
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
31+
env:
32+
CC: gcc
8633
- name: Run Tests
87-
run: meson test -C builddir -v
88-
34+
run: meson test -C builddir -v --test-args='show --mode tree --result fail'
8935
- name: Upload Test Log
90-
if: failure()
9136
uses: actions/upload-artifact@v4
37+
if: failure()
9238
with:
93-
name: macos_xcode_${{ matrix.xcode_version }}_meson_testlog
39+
name: ${{ matrix.os }}_Meson_Testlog
9440
path: builddir/meson-logs/testlog.txt
95-
96-
build_msys:
97-
name: Building on MSYS ${{ matrix.architecture }}
98-
runs-on: windows-latest
99-
strategy:
100-
matrix:
101-
architecture: [x86, x64]
102-
steps:
103-
- name: Checkout code
104-
uses: actions/checkout@v5
105-
with:
106-
fetch-depth: 0
107-
108-
- name: Set up MSYS2
109-
uses: msys2/setup-msys2@v2
110-
with:
111-
update: true
112-
113-
- name: Set environment variables
114-
run: |
115-
echo "CC=/mingw${{ matrix.architecture }}/bin/gcc.exe" >> $GITHUB_ENV
116-
echo "CXX=/mingw${{ matrix.architecture }}/bin/g++.exe" >> $GITHUB_ENV
117-
118-
- name: Set up Python
119-
uses: actions/setup-python@v6
120-
with:
121-
python-version: '3.12'
122-
123-
- name: Install Meson and Ninja
124-
run: |
125-
python -m pip install meson ninja
126-
127-
- name: Configure
128-
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
129-
130-
- name: Run Tests
131-
run: meson test -C builddir -v --test-args='show --mode tree --verbose ci --result fail'
132-
133-
build_mingw:
134-
name: Building on MinGW ${{ matrix.architecture }}
135-
runs-on: windows-latest
136-
strategy:
137-
matrix:
138-
architecture: [x86, x64]
139-
steps:
140-
- name: Checkout code
141-
uses: actions/checkout@v5
142-
with:
143-
fetch-depth: 0
144-
145-
- name: Install MinGW
146-
run: |
147-
choco install mingw
148-
149-
- name: Set environment variables
150-
run: |
151-
if ($env:matrix_architecture -eq "x86") {
152-
$env:CC="C:/tools/mingw32/bin/gcc.exe"
153-
$env:CXX="C:/tools/mingw32/bin/g++.exe"
154-
} else {
155-
$env:CC="C:/tools/mingw64/bin/gcc.exe"
156-
$env:CXX="C:/tools/mingw64/bin/g++.exe"
157-
}
158-
159-
- name: Set up Python
160-
uses: actions/setup-python@v6
161-
with:
162-
python-version: '3.12'
163-
164-
- name: Install Meson and Ninja
165-
run: |
166-
python -m pip install meson ninja
167-
168-
- name: Configure
169-
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
170-
171-
- name: Run Tests
172-
run: meson test -C builddir -v --test-args='show --mode tree --verbose ci --result fail'
173-
174-
build_posix:
175-
name: Build on Linux ${{ matrix.distro }}
176-
runs-on: ubuntu-latest
177-
178-
strategy:
179-
matrix:
180-
distro: [ubuntu, fedora, archlinux, debian] # in a new experiment add alpine and opensuse
181-
182-
steps:
183-
- name: Checkout code
184-
uses: actions/checkout@v5
185-
with:
186-
fetch-depth: 0
187-
188-
- name: Set up Docker Buildx
189-
uses: docker/setup-buildx-action@v3
190-
191-
- name: Cache Docker layers
192-
uses: actions/cache@v4
193-
with:
194-
path: /tmp/.buildx-cache
195-
key: ${{ runner.os }}-buildx-${{ matrix.distro }}
196-
restore-keys: |
197-
${{ runner.os }}-buildx
198-
199-
- name: Build Docker Image
200-
run: |
201-
docker build \
202-
--file .github/ciimage/Dockerfile.${{ matrix.distro }} \
203-
--tag ${GITHUB_REPOSITORY}:${{ matrix.distro }} .
204-
205-
- name: Run Meson Build in Docker Container
206-
run: |
207-
docker run --rm \
208-
-v ${{ github.workspace }}:/workspace \
209-
-w /workspace \
210-
${GITHUB_REPOSITORY}:${{ matrix.distro }} \
211-
/bin/bash -c "
212-
sudo apt update
213-
meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
214-
meson test -C builddir -v --test-args='show --mode tree --verbose ci --result fail'"

0 commit comments

Comments
 (0)