88 types : [opened, synchronize, reopened]
99
1010jobs :
11- build-linux :
12- name : Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
11+ build-linux-cmake :
12+ name : CMake Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
1313 runs-on : ubuntu-latest
1414
1515 strategy :
1616 fail-fast : false
1717 matrix :
18- platform :
18+ platform :
1919 - { name: x86, flags: "-m32" }
2020 - { name: x64, flags: "-m64" }
2121 compiler :
22- - { name: GNU, CC: gcc }
23- - { name: LLVM, CC: clang }
24- flavor :
22+ - { name: GNU, CC: gcc, CXX: g++ }
23+ - { name: LLVM, CC: clang, CXX: clang++ }
24+ flavor :
2525 - Debug
2626 - Release
27- mode :
28- - { name: default, args: "" }
27+ mode :
28+ - { name: default, args: "" }
2929 - { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON }
3030
3131 steps :
3232 - name : Checkout
33- uses : actions/checkout@v3.1.0
33+ uses : actions/checkout@v4
3434
3535 - if : matrix.platform.name == 'x86'
3636 name : Bootstrap
@@ -47,40 +47,133 @@ jobs:
4747 mkdir build
4848 cd build
4949 cmake -DCMAKE_C_FLAGS=${{ matrix.platform.flags }} -DCMAKE_CXX_FLAGS=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} ..
50-
50+
5151 - name : Build
5252 run : |
5353 cmake --build build --config ${{ matrix.flavor }}
5454
55- build-windows :
56- name : Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
55+ build-linux-meson :
56+ name : Meson Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
57+ runs-on : ubuntu-latest
58+
59+ strategy :
60+ fail-fast : false
61+ matrix :
62+ platform :
63+ - { name: x86, flags: "-m32" }
64+ - { name: x64, flags: "-m64" }
65+ compiler :
66+ - { name: GNU, CC: gcc, CXX: g++ }
67+ - { name: LLVM, CC: clang, CXX: clang++ }
68+ flavor :
69+ - debug
70+ - release
71+ mode :
72+ - { name: default, args: -Dtests=enabled }
73+ - { name: NO_LIBC, args: -Dnolibc=true }
74+
75+ steps :
76+ - name : Setup meson
77+ run : |
78+ pipx install meson
79+ sudo apt-get install -y ninja-build
80+
81+ - name : Checkout
82+ uses : actions/checkout@v4
83+
84+ - if : matrix.platform.name == 'x86'
85+ name : Bootstrap
86+ run : |
87+ sudo dpkg --add-architecture i386
88+ sudo rm /etc/apt/sources.list.d/* && sudo apt-get update
89+ sudo apt-get install -y g++-multilib g++
90+
91+ - name : Configure
92+ env :
93+ CC : ${{ matrix.compiler.CC }}
94+ CXX : ${{ matrix.compiler.CXX }}
95+ run : |
96+ meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }} -Dc_extra_args="${{ matrix.platform.flags }}" -Dcpp_extra_args="${{ matrix.platform.flags }}"
97+
98+ - name : Build
99+ run : |
100+ meson compile -C build-${{ matrix.flavor }}
101+
102+ - name : Run tests
103+ run : |
104+ meson test -C build-${{ matrix.flavor }}
105+
106+ build-windows-cmake :
107+ name : CMake Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
57108 runs-on : windows-latest
58109
59110 strategy :
60111 fail-fast : false
61112 matrix :
62- platform :
113+ platform :
63114 - { name: x86, flags: "Win32" }
64- - { name: x64, flags: "x64" }
115+ - { name: x64, flags: "x64" }
65116 compiler :
66117 - { name: MSVC }
67- flavor :
118+ flavor :
68119 - Debug
69120 - Release
70- mode :
71- - { name: default, args: "" }
121+ mode :
122+ - { name: default, args: "" }
72123 - { name: NO_LIBC, args: -DZYAN_NO_LIBC=ON }
73124
74125 steps :
75126 - name : Checkout
76- uses : actions/checkout@v3.1.0
127+ uses : actions/checkout@v4
77128
78129 - name : Configure
79130 run : |
80131 mkdir build
81132 cd build
82133 cmake -DCMAKE_GENERATOR_PLATFORM=${{ matrix.platform.flags }} -DZYAN_DEV_MODE=ON ${{ matrix.mode.args }} ..
83-
134+
84135 - name : Build
85136 run : |
86137 cmake --build build --config ${{ matrix.flavor }}
138+
139+ build-windows-meson :
140+ name : Meson Build ${{ matrix.platform.name }} ${{ matrix.compiler.name }} ${{ matrix.flavor }} (${{ matrix.mode.name }})
141+ runs-on : windows-latest
142+
143+ strategy :
144+ fail-fast : false
145+ matrix :
146+ platform :
147+ - { name: x86, flags: "amd64_x86" }
148+ - { name: x64, flags: "amd64" }
149+ compiler :
150+ - { name: MSVC }
151+ flavor :
152+ - debug
153+ - release
154+ mode :
155+ - { name: default, args: -Dtests=enabled }
156+ - { name: NO_LIBC, args: -Dnolibc=true }
157+
158+ steps :
159+ - name : Setup meson
160+ run : |
161+ pipx install meson
162+ choco install ninja
163+
164+ - name : Checkout
165+ uses : actions/checkout@v4
166+
167+ - name : Configure
168+ run : |
169+ $VCPATH = vswhere -requires Microsoft.VisualStudio.Component.VC.Tools.x86.x64 -property installationPath -latest
170+ & $VCPATH\VC\Auxiliary\Build\vcvarsall.bat ${{ matrix.platform.flags }}
171+ meson setup build-${{ matrix.flavor }} --buildtype=${{ matrix.flavor }} ${{ matrix.mode.args }}
172+
173+ - name : Build
174+ run : |
175+ meson compile -C build-${{ matrix.flavor }}
176+
177+ - name : Run tests
178+ run : |
179+ meson test -C build-${{ matrix.flavor }}
0 commit comments