Skip to content

Commit 22686db

Browse files
authored
Merge pull request #1 from Totto16/update_ci
Update CI
2 parents cef69b5 + 9ac4533 commit 22686db

File tree

5 files changed

+4138
-36
lines changed

5 files changed

+4138
-36
lines changed

.github/workflows/ci.yml

Lines changed: 23 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Build CI
22

33
on:
44
push:
5-
branches: ["main"]
5+
branches: ['main']
66
pull_request:
77
workflow_dispatch:
88

@@ -23,29 +23,27 @@ 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-
4947

5048
- name: Setup MSVC (Windows)
5149
if: matrix.config.os == 'windows'
@@ -65,7 +63,8 @@ jobs:
6563
if: matrix.config.os == 'macos'
6664
run: |
6765
brew update
68-
brew install llvm@18
66+
# TODO annotate with lld@19, after that is accepted, we don't want to use lld@20 without manually updating it !
67+
brew install llvm@19 lld
6968
echo "$(brew --prefix)/opt/llvm/bin" >> $GITHUB_PATH
7069
echo "LDFLAGS=-L$(brew --prefix)/opt/llvm/lib -L$(brew --prefix)/opt/llvm/lib/c++ -Wl,-rpath,$(brew --prefix)/opt/llvm/lib/c++" >> "$GITHUB_ENV"
7170
echo "CPPFLAGS=-I$(brew --prefix)/opt/llvm/include" >> "$GITHUB_ENV"
@@ -77,11 +76,11 @@ jobs:
7776
echo "OBJC_LD=lld" >> "$GITHUB_ENV"
7877
7978
- name: Setup meson (MacOS)
80-
if: matrix.config.os == 'macos'
79+
if: matrix.config.os == 'macos'
8180
run: |
8281
brew update
8382
brew install meson
84-
83+
8584
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
8685
- name: Setup meson
8786
if: matrix.config.os != 'macos'
@@ -92,41 +91,41 @@ jobs:
9291
if: matrix.config.os == 'ubuntu'
9392
run: |
9493
sudo apt-get update
95-
sudo apt-get install ninja-build -y
94+
sudo apt-get install ninja-build -y --no-install-recommends
9695
sudo pip install meson --break-system-packages
9796
9897
- name: Fix pkg-config (Windows)
9998
if: matrix.config.os == 'windows'
10099
run: |
101-
Remove-Item -Path C:\Strawberry\ -Recurse
100+
Remove-Item -Path C:\Strawberry\ -Recurse
102101
choco install pkgconfiglite
103102
echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
104-
103+
105104
- name: Configure
106-
run: |
107-
cd oopetris
108-
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' || '' }}
105+
run: |
106+
cd oopetris
107+
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' || '' }}
109108
110109
- name: Build and install Libs
111110
if: matrix.config.os != 'ubuntu'
112-
run: |
113-
cd oopetris
114-
meson install -C build
111+
run: |
112+
cd oopetris
113+
meson install -C build
115114
116115
- name: Build and install Libs (Linux)
117116
if: matrix.config.os == 'ubuntu'
118-
run: |
119-
cd oopetris
120-
sudo meson install -C build
117+
run: |
118+
cd oopetris
119+
sudo meson install -C build
121120
122121
- name: Install Node.js
123122
uses: actions/setup-node@v4
124123
with:
125124
node-version: 20
126125

127126
- name: Build package
128-
run: |
129-
npm install -D
127+
run: |
128+
npm clean-install -D
130129
npm run build --verbose
131130
npm run test
132131
npm pack
@@ -136,4 +135,3 @@ jobs:
136135
with:
137136
name: ${{ matrix.config.name }} Node.js Wrapper
138137
path: oopetris*.tgz
139-

.gitignore

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,5 @@
22

33
node_modules/
44

5-
package-lock.json
6-
75
/dist
86
/prebuilds/

binding.gyp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@
7979
},
8080
"VCLinkerTool": {
8181
"AdditionalDependencies": [
82-
"<!@(pkg-config oopetris-recordings --libs-only-l | sed s/-l/lib/g |sed 's/\s/.a /g')", # adjust to the default setting, namely lib<name>.a via some sed magic
82+
"<!@(pkg-config oopetris-recordings --libs-only-l | sed s/-l/lib/g |sed 's/\\s/.a /g')", # adjust to the default setting, namely lib<name>.a via some sed magic
8383
],
8484
},
8585
},

0 commit comments

Comments
 (0)