Skip to content

Commit 477b7b4

Browse files
committed
ci: fix a few things
format all build files add --no-install-recommends to all apt-get install calls
1 parent cef69b5 commit 477b7b4

File tree

1 file changed

+20
-23
lines changed

1 file changed

+20
-23
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 23 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'
@@ -77,11 +75,11 @@ jobs:
7775
echo "OBJC_LD=lld" >> "$GITHUB_ENV"
7876
7977
- name: Setup meson (MacOS)
80-
if: matrix.config.os == 'macos'
78+
if: matrix.config.os == 'macos'
8179
run: |
8280
brew update
8381
brew install meson
84-
82+
8583
# NOTE: meson has no dependencies, so --break-system-packages doesn't really break anything!
8684
- name: Setup meson
8785
if: matrix.config.os != 'macos'
@@ -92,40 +90,40 @@ jobs:
9290
if: matrix.config.os == 'ubuntu'
9391
run: |
9492
sudo apt-get update
95-
sudo apt-get install ninja-build -y
93+
sudo apt-get install ninja-build -y --no-install-recommends
9694
sudo pip install meson --break-system-packages
9795
9896
- name: Fix pkg-config (Windows)
9997
if: matrix.config.os == 'windows'
10098
run: |
101-
Remove-Item -Path C:\Strawberry\ -Recurse
99+
Remove-Item -Path C:\Strawberry\ -Recurse
102100
choco install pkgconfiglite
103101
echo "PKG_CONFIG_PATH=C:/lib/pkgconfig" | Out-File -FilePath $env:GITHUB_ENV -Append
104-
102+
105103
- 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' || '' }}
104+
run: |
105+
cd oopetris
106+
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' || '' }}
109107
110108
- name: Build and install Libs
111109
if: matrix.config.os != 'ubuntu'
112-
run: |
113-
cd oopetris
114-
meson install -C build
110+
run: |
111+
cd oopetris
112+
meson install -C build
115113
116114
- name: Build and install Libs (Linux)
117115
if: matrix.config.os == 'ubuntu'
118-
run: |
119-
cd oopetris
120-
sudo meson install -C build
116+
run: |
117+
cd oopetris
118+
sudo meson install -C build
121119
122120
- name: Install Node.js
123121
uses: actions/setup-node@v4
124122
with:
125123
node-version: 20
126124

127125
- name: Build package
128-
run: |
126+
run: |
129127
npm install -D
130128
npm run build --verbose
131129
npm run test
@@ -136,4 +134,3 @@ jobs:
136134
with:
137135
name: ${{ matrix.config.name }} Node.js Wrapper
138136
path: oopetris*.tgz
139-

0 commit comments

Comments
 (0)