Skip to content

Commit 49d4b3c

Browse files
revert
1 parent 170ca22 commit 49d4b3c

File tree

5 files changed

+350
-0
lines changed

5 files changed

+350
-0
lines changed
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
# Use a specific Arch Linux base image
2+
FROM archlinux:latest
3+
4+
# Set environment variables to avoid interaction
5+
ENV TZ=UTC
6+
7+
# Update and install system dependencies
8+
RUN pacman -Syu --noconfirm && \
9+
pacman -S --noconfirm \
10+
gcc \
11+
clang \
12+
gdb \
13+
llvm \
14+
wget \
15+
python \
16+
python-pip \
17+
git \
18+
meson \
19+
ninja \
20+
tzdata && \
21+
pacman -Scc --noconfirm
22+
23+
# Set environment variables
24+
ENV CC=/usr/bin/clang
25+
ENV CXX=/usr/bin/clang++
26+
ENV LD_LIBRARY_PATH=/usr/local/lib
27+
28+
# Set working directory
29+
WORKDIR /workspace
30+
31+
# Default command
32+
CMD ["bash"]

.github/ciimage/Dockerfile.debian

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
# Use a specific Debian Bookworm base image
2+
FROM debian:bookworm
3+
4+
# Set environment variables to avoid interaction
5+
ENV DEBIAN_FRONTEND=noninteractive \
6+
TZ=UTC
7+
8+
# Install system dependencies and clean up
9+
RUN apt-get update && \
10+
apt-get install -y --no-install-recommends \
11+
build-essential \
12+
clang \
13+
gcc \
14+
g++ \
15+
gdb \
16+
llvm \
17+
libstdc++-12-dev \
18+
wget \
19+
python3 \
20+
python3-full \
21+
python3-pip \
22+
git \
23+
ca-certificates && \
24+
apt-get clean && \
25+
rm -rf /var/lib/apt/lists/*
26+
27+
# Install Meson and Ninja using pip
28+
RUN python3 -m pip install --no-cache-dir meson==1.8.0 ninja==1.10.2 --break-system-packages
29+
30+
# Set environment variables
31+
ENV CC=clang \
32+
CXX=clang++ \
33+
LD_LIBRARY_PATH=/usr/local/lib
34+
35+
# Set working directory
36+
WORKDIR /workspace
37+
38+
# Default command
39+
CMD ["bash"]

.github/ciimage/Dockerfile.fedora

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# Use a specific Fedora base image
2+
FROM fedora:34
3+
4+
# Set environment variables to avoid interaction
5+
ENV TZ=UTC
6+
7+
# Install system dependencies and clean up
8+
RUN dnf -y update && \
9+
dnf -y groupinstall "Development Tools" && \
10+
dnf install -y \
11+
gcc \
12+
gcc-c++ \
13+
clang \
14+
gdb \
15+
llvm \
16+
wget \
17+
python3 \
18+
python3-pip \
19+
git && \
20+
dnf clean all
21+
# Install Meson and Ninja using pip
22+
RUN python3 -m pip install --no-cache-dir meson ninja
23+
24+
# Set environment variables
25+
ENV CC=/usr/bin/clang
26+
ENV CXX=/usr/bin/clang++
27+
ENV LD_LIBRARY_PATH=/usr/local/lib64
28+
29+
# Set working directory
30+
WORKDIR /workspace
31+
32+
# Default command
33+
CMD ["bash"]

.github/ciimage/Dockerfile.ubuntu

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
# Use a specific Ubuntu base image
2+
FROM ubuntu:20.04
3+
4+
# Set environment variables to avoid interaction
5+
ENV DEBIAN_FRONTEND=noninteractive \
6+
TZ=UTC
7+
8+
# Install system dependencies and clean up
9+
RUN apt-get update && \
10+
apt-get install -y \
11+
build-essential \
12+
clang \
13+
gcc \
14+
g++ \
15+
gdb \
16+
llvm \
17+
libstdc++-10-dev \
18+
wget \
19+
python3 \
20+
python3-pip \
21+
git \
22+
tzdata && \
23+
apt-get clean && \
24+
rm -rf /var/lib/apt/lists/*
25+
26+
RUN python3 -m pip install --no-cache-dir meson ninja
27+
28+
# Set environment variables
29+
ENV CC=/usr/bin/gcc
30+
ENV CXX=/usr/bin/g++
31+
ENV LD_LIBRARY_PATH=/usr/local/lib

.github/workflows/meson_ci.yml

Lines changed: 215 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,218 @@ jobs:
3838
with:
3939
name: ${{ matrix.os }}_Meson_Testlog
4040
path: builddir/meson-logs/testlog.txt
41+
42+
43+
44+
on:
45+
schedule:
46+
- cron: '15 21 * * *'
47+
push:
48+
branches:
49+
- main
50+
pull_request:
51+
branches:
52+
- main
53+
54+
jobs:
55+
build_msvc:
56+
name: Building on MSVC ${{ matrix.msvc_version }}
57+
runs-on: windows-latest
58+
strategy:
59+
matrix:
60+
msvc_version: [2019, 2022, 2025]
61+
steps:
62+
- name: Checkout code
63+
uses: actions/checkout@v5
64+
with:
65+
fetch-depth: 0
66+
67+
- name: Set up Python
68+
uses: actions/setup-python@v6
69+
with:
70+
python-version: '3.12'
71+
72+
- name: Install Meson and Ninja
73+
shell: pwsh
74+
run: |
75+
python -m pip install --upgrade pip
76+
python -m pip install meson ninja
77+
if ($env:msvc_version -eq "2019") {
78+
choco install visualstudio2019buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
79+
} elseif ($env:msvc_version -eq "2022") {
80+
choco install visualstudio2022buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
81+
} elseif ($env:msvc_version -eq "2025") {
82+
choco install visualstudio2025buildtools --package-parameters "--add Microsoft.VisualStudio.Workload.VCTools --includeRecommended --includeOptional --passive"
83+
}
84+
$env:CC="cl.exe"
85+
$env:CXX="cl.exe"
86+
87+
- name: Configure
88+
run: meson setup builddir_msvc_${{ matrix.msvc_version }} --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
89+
90+
- name: Run Tests
91+
run: meson test -C builddir_msvc_${{ matrix.msvc_version }} -v --test-args='show --mode tree --verbose ci --result fail'
92+
93+
build_macosx:
94+
name: Building on MacOSX
95+
runs-on: macos-latest
96+
steps:
97+
- name: Checkout code
98+
uses: actions/checkout@v5
99+
with:
100+
fetch-depth: 0
101+
102+
- name: Set up Python
103+
uses: actions/setup-python@v6
104+
with:
105+
python-version: '3.12'
106+
107+
- name: Install Xcode Command Line Tools
108+
run: |
109+
if ! xcode-select -p &>/dev/null; then
110+
sudo xcode-select --install
111+
until xcode-select -p &>/dev/null; do sleep 5; done
112+
fi
113+
114+
- name: Install Xcode
115+
run: sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
116+
117+
- name: Install Meson, Ninja
118+
run: |
119+
python -m pip install meson ninja
120+
121+
- name: Configure
122+
run: OBJC=clang OBJCXX=clang++ meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
123+
124+
- name: Compile
125+
run: meson compile -C builddir
126+
127+
- name: Run Tests
128+
run: meson test -C builddir -v
129+
130+
- name: Upload Test Log
131+
if: failure()
132+
uses: actions/upload-artifact@v4
133+
with:
134+
name: macos_xcode_${{ matrix.xcode_version }}_meson_testlog
135+
path: builddir/meson-logs/testlog.txt
136+
137+
build_msys:
138+
name: Building on MSYS ${{ matrix.architecture }}
139+
runs-on: windows-latest
140+
strategy:
141+
matrix:
142+
architecture: [x86, x64]
143+
steps:
144+
- name: Checkout code
145+
uses: actions/checkout@v5
146+
with:
147+
fetch-depth: 0
148+
149+
- name: Set up MSYS2
150+
uses: msys2/setup-msys2@v2
151+
with:
152+
update: true
153+
154+
- name: Set environment variables
155+
run: |
156+
echo "CC=/mingw${{ matrix.architecture }}/bin/gcc.exe" >> $GITHUB_ENV
157+
echo "CXX=/mingw${{ matrix.architecture }}/bin/g++.exe" >> $GITHUB_ENV
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_mingw:
175+
name: Building on MinGW ${{ matrix.architecture }}
176+
runs-on: windows-latest
177+
strategy:
178+
matrix:
179+
architecture: [x86, x64]
180+
steps:
181+
- name: Checkout code
182+
uses: actions/checkout@v5
183+
with:
184+
fetch-depth: 0
185+
186+
- name: Install MinGW
187+
run: |
188+
choco install mingw
189+
190+
- name: Set environment variables
191+
run: |
192+
if ($env:matrix_architecture -eq "x86") {
193+
$env:CC="C:/tools/mingw32/bin/gcc.exe"
194+
$env:CXX="C:/tools/mingw32/bin/g++.exe"
195+
} else {
196+
$env:CC="C:/tools/mingw64/bin/gcc.exe"
197+
$env:CXX="C:/tools/mingw64/bin/g++.exe"
198+
}
199+
200+
- name: Set up Python
201+
uses: actions/setup-python@v6
202+
with:
203+
python-version: '3.12'
204+
205+
- name: Install Meson and Ninja
206+
run: |
207+
python -m pip install meson ninja
208+
209+
- name: Configure
210+
run: meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
211+
212+
- name: Run Tests
213+
run: meson test -C builddir -v --test-args='show --mode tree --verbose ci --result fail'
214+
215+
build_posix:
216+
name: Build on Linux ${{ matrix.distro }}
217+
runs-on: ubuntu-latest
218+
219+
strategy:
220+
matrix:
221+
distro: [ubuntu, fedora, archlinux, debian] # in a new experiment add alpine and opensuse
222+
223+
steps:
224+
- name: Checkout code
225+
uses: actions/checkout@v5
226+
with:
227+
fetch-depth: 0
228+
229+
- name: Set up Docker Buildx
230+
uses: docker/setup-buildx-action@v3
231+
232+
- name: Cache Docker layers
233+
uses: actions/cache@v4
234+
with:
235+
path: /tmp/.buildx-cache
236+
key: ${{ runner.os }}-buildx-${{ matrix.distro }}
237+
restore-keys: |
238+
${{ runner.os }}-buildx
239+
240+
- name: Build Docker Image
241+
run: |
242+
docker build \
243+
--file .github/ciimage/Dockerfile.${{ matrix.distro }} \
244+
--tag ${GITHUB_REPOSITORY}:${{ matrix.distro }} .
245+
246+
- name: Run Meson Build in Docker Container
247+
run: |
248+
docker run --rm \
249+
-v ${{ github.workspace }}:/workspace \
250+
-w /workspace \
251+
${GITHUB_REPOSITORY}:${{ matrix.distro }} \
252+
/bin/bash -c "
253+
sudo apt update
254+
meson setup builddir --fatal-meson-warnings -Dwerror=true -Dwith_test=enabled -Dwarning_level=3
255+
meson test -C builddir -v --test-args='show --mode tree --verbose ci --result fail'"

0 commit comments

Comments
 (0)