Skip to content

Commit 7c12cd9

Browse files
authored
Refactor build-release.yml for better dependency management
Updated the build workflow to install dependencies for each OS and improved comments.
1 parent ac7df51 commit 7c12cd9

File tree

1 file changed

+26
-20
lines changed

1 file changed

+26
-20
lines changed

.github/workflows/build-release.yml

Lines changed: 26 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -10,46 +10,52 @@ jobs:
1010
build:
1111
name: Build on ${{ matrix.os }}
1212
runs-on: ${{ matrix.os }}
13+
1314
strategy:
14-
# This ensures that if Windows fails, Ubuntu and macOS keep running
15-
fail-fast: false
15+
fail-fast: false
1616
matrix:
1717
os: [ubuntu-latest, macos-latest, windows-latest]
1818

1919
steps:
2020
# -------------------------------
21-
# Checkout repo (Upgraded to v4)
21+
# Checkout
2222
# -------------------------------
2323
- uses: actions/checkout@v4
2424

2525
# -------------------------------
26-
# Linux/macOS permissions
27-
# -------------------------------
28-
- name: Set executable permission for bootstrap.sh
29-
if: runner.os != 'Windows'
30-
run: chmod +x bootstrap.sh
31-
32-
# -------------------------------
33-
# Build via bootstrap
26+
# Install build tools (cross-platform)
3427
# -------------------------------
28+
- name: Install dependencies (Ubuntu)
29+
if: runner.os == 'Linux'
30+
run: |
31+
sudo apt-get update
32+
sudo apt-get install -y build-essential make zlib1g-dev
3533
36-
- name: Run bootstrap
37-
if: runner.os != 'Windows'
38-
# We use 'bash' to ensure the PATH export works
39-
shell: bash
40-
run: ./bootstrap.sh
34+
- name: Install dependencies (macOS)
35+
if: runner.os == 'macOS'
36+
run: |
37+
brew install make zlib
4138
42-
- name: Run bootstrap (Windows)
39+
- name: Install dependencies (Windows)
4340
if: runner.os == 'Windows'
4441
shell: pwsh
45-
run: .\bootstrap.ps1
42+
run: |
43+
choco install make -y
44+
45+
# -------------------------------
46+
# Build
47+
# -------------------------------
48+
- name: Build install
49+
run: make install
50+
51+
- name: Build LoCo
52+
run: make loco
4653

4754
# -------------------------------
48-
# Upload binaries (Upgraded to v4)
55+
# Upload binaries
4956
# -------------------------------
5057
- name: Upload binaries
5158
uses: actions/upload-artifact@v4
5259
with:
53-
# v4 requires unique names for each matrix run
5460
name: loco-${{ matrix.os }}
5561
path: bin/

0 commit comments

Comments
 (0)