@@ -2,7 +2,7 @@ name: Build CI
22
33on :
44 push :
5- branches : [" main" ]
5+ branches : [' main' ]
66 pull_request :
77 workflow_dispatch :
88
@@ -23,33 +23,32 @@ jobs:
2323 os : ubuntu
2424 os-version : 24.04
2525
26- - name : MacOS
26+ - name : MacOS
2727 os : macos
2828 os-version : 13
2929
3030 - name : MacOS (Arm64)
3131 os : macos
3232 os-version : 14
3333
34-
3534 steps :
3635 - uses : actions/checkout@v4
3736 with :
38- fetch-depth : " 0 "
37+ fetch-depth : ' 0 '
3938
4039 - uses : actions/checkout@v4
41- name : Checkout OOPetris main repo
40+ name : Checkout OOPetris main repo
4241 with :
43- fetch-depth : " 0 "
42+ fetch-depth : ' 0 '
4443 repository : OpenBrickProtocolFoundation/oopetris
4544 ref : main
4645 path : ./oopetris
4746 submodules : false
48-
47+
4948 - uses : actions/checkout@v4
5049 name : Checkout C Wrapper
5150 with :
52- fetch-depth : " 0 "
51+ fetch-depth : ' 0 '
5352 repository : Totto16/oopetris_wrapper_c
5453 ref : main
5554 path : ./oopetris_c_wrapper
@@ -85,11 +84,11 @@ jobs:
8584 echo "OBJC_LD=lld" >> "$GITHUB_ENV"
8685
8786 - name : Setup meson (MacOS)
88- if : matrix.config.os == 'macos'
87+ if : matrix.config.os == 'macos'
8988 run : |
9089 brew update
9190 brew install meson
92-
91+
9392 # NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
9493 - name : Setup meson
9594 if : matrix.config.os != 'macos'
10099 if : matrix.config.os == 'ubuntu'
101100 run : |
102101 sudo apt-get update
103- sudo apt-get install ninja-build -y
102+ sudo apt-get install ninja-build -y --no-install-recommends
104103 sudo pip install meson --break-system-packages
105104
106105 - name : Fix pkg-config (Windows)
@@ -109,42 +108,41 @@ jobs:
109108 Remove-Item -Path C:\Strawberry\ -Recurse
110109 choco install pkgconfiglite
111110 echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
112-
111+
113112 - name : Configure
114- run : |
115- cd oopetris
116- meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ matrix.config.os == 'macos' && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=static_from_buildtype' || '' }}
113+ run : |
114+ cd oopetris
115+ meson setup build -Dbuildtype=release -Ddefault_library=static -Dclang_libcpp=${{ matrix.config.os == 'macos' && 'enabled' || 'disabled' }} -Donly_build_libs=true ${{ matrix.config.os == 'windows' && '-Db_vscrt=static_from_buildtype' || '' }}
117116
118117 - name : Build and install Libs
119118 if : matrix.config.os != 'ubuntu'
120- run : |
119+ run : |
121120 cd oopetris
122- meson install -C build
121+ meson install -C build
123122
124123 - name : Build and install Libs (Linux)
125124 if : matrix.config.os == 'ubuntu'
126- run : |
125+ run : |
127126 cd oopetris
128- sudo meson install -C build
127+ sudo meson install -C build
129128
130- - name : Build C Wrapper
131- run : |
129+ - name : BuildC Wrapper
130+ run : |
132131 cd oopetris_c_wrapper
133132 meson setup -Dtests=false -Dexample=false build -Dbuildtype=release -Ddefault_library=static
134133 meson compile -C build
135-
136134
137135 - name : Install C Wrapper
138136 if : matrix.config.os != 'ubuntu'
139- run : |
137+ run : |
140138 cd oopetris_c_wrapper
141- meson install -C build
139+ meson install -C build
142140
143141 - name : Build and install Libs (Linux)
144142 if : matrix.config.os == 'ubuntu'
145- run : |
143+ run : |
146144 cd oopetris_c_wrapper
147- sudo meson install -C build
145+ sudo meson install -C build
148146
149147 - uses : haskell-actions/setup@v2
150148 with :
@@ -153,7 +151,7 @@ jobs:
153151 stack-version : ' latest'
154152
155153 - name : Build Wrapper
156- run : |
154+ run : |
157155 stack build
158156 stack test
159157 stack run -- test/files/correct.rec
0 commit comments