@@ -2,7 +2,7 @@ name: Build CI
22
33on :
44 push :
5- branches : [" main" ]
5+ branches : [' main' ]
66 pull_request :
77 workflow_dispatch :
88
@@ -26,14 +26,14 @@ jobs:
2626 os-version : 2022
2727 environment : mingw
2828 architecture : x86_64
29- shell : " msys2 {0}"
29+ shell : ' msys2 {0}'
3030
3131 - name : Windows UCRT Release
3232 os : windows
3333 os-version : 2022
3434 environment : ucrt
3535 architecture : ucrt-x86_64
36- shell : " msys2 {0}"
36+ shell : ' msys2 {0}'
3737
3838 - name : Linux Release
3939 os : ubuntu
@@ -74,17 +74,17 @@ jobs:
7474 steps :
7575 - uses : actions/checkout@v4
7676 with :
77- fetch-depth : " 0 "
77+ fetch-depth : ' 0 '
7878
7979 - uses : actions/checkout@v4
80- name : Checkout OOPetris main repo
80+ name : Checkout OOPetris main repo
8181 with :
82- fetch-depth : " 0 "
82+ fetch-depth : ' 0 '
8383 repository : OpenBrickProtocolFoundation/oopetris
8484 ref : main
8585 path : ./oopetris
8686 submodules : false
87-
87+
8888 - name : Setup MSVC (Windows)
8989 if : matrix.config.os == 'windows' && matrix.config.environment == 'msvc'
9090 uses : TheMrMilchmann/setup-msvc-dev@v3
@@ -107,26 +107,25 @@ jobs:
107107 mingw-w64-${{matrix.config.architecture}}-ca-certificates
108108 mingw-w64-${{matrix.config.architecture}}-cmake
109109 git
110-
110+
111111 - name : Setup Clang (Linux)
112112 if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == true
113113 run : |
114114 wget https://apt.llvm.org/llvm.sh
115115 chmod +x llvm.sh
116116 sudo ./llvm.sh 18
117- sudo apt-get install libc++-18* libc++abi*18* -y
117+ sudo apt-get install libc++-18* libc++abi*18* -y --no-install-recommends
118118 echo "CC=clang-18" >> "$GITHUB_ENV"
119119 echo "CXX=clang++-18" >> "$GITHUB_ENV"
120120 echo "OBJC=clang-18" >> "$GITHUB_ENV"
121-
122-
121+
123122 - name : Setup GCC (Linux)
124123 if : matrix.config.os == 'ubuntu' && matrix.config.use-clang == false
125124 uses : egor-tensin/setup-gcc@v1
126125 with :
127126 version : 14
128127 platform : x64
129-
128+
130129 - name : Setup Clang (MacOS)
131130 if : matrix.config.os == 'macos'
132131 run : |
@@ -143,11 +142,11 @@ jobs:
143142 echo "OBJC_LD=lld" >> "$GITHUB_ENV"
144143
145144 - name : Setup meson (MacOS)
146- if : matrix.config.os == 'macos'
145+ if : matrix.config.os == 'macos'
147146 run : |
148147 brew update
149148 brew install meson
150-
149+
151150 # NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
152151 - name : Setup meson
153152 if : matrix.config.os != 'macos'
@@ -158,7 +157,7 @@ jobs:
158157 if : matrix.config.os == 'ubuntu'
159158 run : |
160159 sudo apt-get update
161- sudo apt-get install ninja-build libreadline-dev -y
160+ sudo apt-get install ninja-build libreadline-dev -y --no-install-recommends
162161 sudo pip install meson --break-system-packages
163162
164163 - name : Fix pkg-config (Windows MSVC)
@@ -169,23 +168,23 @@ jobs:
169168 echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
170169
171170 - name : Configure
172- run : |
173- cd oopetris
174- meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }} ${{ (matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )) && '-Dprefix=$RUNNER_TEMP/msys64${MINGW_PREFIX}/' || ''}}
171+ run : |
172+ cd oopetris
173+ meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }} ${{ (matrix.config.os == 'windows' && ( matrix.config.environment == 'mingw' || matrix.config.environment == 'ucrt' )) && '-Dprefix=$RUNNER_TEMP/msys64${MINGW_PREFIX}/' || ''}}
175174
176175 - name : Build and install Libs
177176 if : matrix.config.os != 'ubuntu'
178- run : |
179- cd oopetris
180- meson install -C build
177+ run : |
178+ cd oopetris
179+ meson install -C build
181180
182181 - name : Build and install Libs (Linux)
183182 if : matrix.config.os == 'ubuntu'
184- run : |
185- cd oopetris
186- sudo meson install -C build
183+ run : |
184+ cd oopetris
185+ sudo meson install -C build
187186
188187 - name : Build Wrapper
189- run : |
190- meson setup -Dtests=false -Dexample=true build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }}
188+ run : |
189+ meson setup -Dtests=false -Dexample=true build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ ( ( matrix.config.os == 'ubuntu' && matrix.config.use-clang == true && matrix.config.use-clang_stdlib ) || matrix.config.os == 'macos' ) && 'enabled' || 'disabled' }} ${{ matrix.config.os == 'windows' && '-Db_vscrt=from_buildtype' || '' }}
191190 meson compile -C build
0 commit comments