Skip to content

Commit ef2177e

Browse files
committed
3rdparty: publish macOS + Windows prebuilt tarballs from CI
The mesh's 3rdparty fetch downloads a per-platform prebuilt tarball and only falls back to a from-source build on a miss. Until now the build-3rdparty-*.yml matrices published linux-{x86_64,aarch64,riscv64} only, so every macOS/Windows deploy host rebuilt all nine libs from source on each configure — slow, and on macOS it picked up a stray Homebrew /usr/local/include/libco.h that shadowed the vendored header. Extend each matrix to also build macos-arm64 (macos-14), macos-x86_64 (macos-13) and windows-x86_64 (windows-latest) on native runners, so the mesh fetches real per-OS artifacts instead of building anything locally. Windows sets up MSVC via msvc-dev-cmd and installs ninja (+ nasm for openssl); macOS installs ninja (cmake/clang/perl ship with the runner). Also force the vendored IMPORTED-target include dirs to -I via CMAKE_NO_SYSTEM_FROM_IMPORTED so our headers always win over a same-named header in a host system dir (the /usr/local/include/libco.h shadowing).
1 parent 57a394b commit ef2177e

10 files changed

Lines changed: 259 additions & 56 deletions

.github/workflows/build-3rdparty-libco.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libco for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libcurl.yml

Lines changed: 28 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -45,31 +45,51 @@ jobs:
4545
4646
build:
4747
needs: resolve
48-
runs-on: ubuntu-latest
48+
runs-on: ${{ matrix.os }}
4949
strategy:
5050
fail-fast: false
5151
matrix:
52-
target:
53-
- linux-x86_64
54-
- linux-aarch64
55-
- linux-riscv64
52+
# Each target builds on its native runner so the published tarball is a
53+
# real per-OS/per-arch artifact — the mesh fetches these instead of
54+
# building any 3rdparty lib from source on the deploy host.
55+
include:
56+
- { target: linux-x86_64, os: ubuntu-latest }
57+
- { target: linux-aarch64, os: ubuntu-latest }
58+
- { target: linux-riscv64, os: ubuntu-latest }
59+
- { target: macos-arm64, os: macos-14 }
60+
- { target: macos-x86_64, os: macos-13 }
61+
- { target: windows-x86_64, os: windows-latest }
5662
steps:
5763
- uses: actions/checkout@v4
5864

59-
- name: install build deps
65+
- name: install linux deps
66+
if: runner.os == 'Linux'
6067
run: |
6168
set -euo pipefail
6269
sudo apt-get update -y
63-
# perl is needed in case libcurl has to build openssl from the sibling
64-
# recipe (no prebuilt openssl release for this version/platform yet).
6570
pkgs="build-essential perl cmake ninja-build pkg-config curl tar xz-utils ca-certificates git"
6671
case "${{ matrix.target }}" in
6772
linux-aarch64) pkgs="$pkgs gcc-aarch64-linux-gnu g++-aarch64-linux-gnu binutils-aarch64-linux-gnu" ;;
6873
linux-riscv64) pkgs="$pkgs gcc-riscv64-linux-gnu g++-riscv64-linux-gnu binutils-riscv64-linux-gnu" ;;
6974
esac
7075
sudo apt-get install -y --no-install-recommends $pkgs
7176
77+
- name: install macos deps
78+
if: runner.os == 'macOS'
79+
run: brew install ninja # cmake, clang, perl, make ship with the runner
80+
81+
- name: set up MSVC (windows)
82+
if: runner.os == 'Windows'
83+
uses: ilammy/msvc-dev-cmd@v1
84+
with:
85+
arch: x64
86+
87+
- name: install windows deps
88+
if: runner.os == 'Windows'
89+
run: choco install ninja -y --no-progress
90+
7291
- name: build libcurl for ${{ matrix.target }}
92+
shell: bash
7393
run: |
7494
mkdir -p out
7595
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libgit2.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libgit2 for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libmdbx.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libmdbx for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libsqlite3.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libsqlite3 for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libuv.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libuv for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

.github/workflows/build-3rdparty-libyaml.yml

Lines changed: 28 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,18 +42,25 @@ jobs:
4242
4343
build:
4444
needs: resolve
45-
runs-on: ubuntu-latest
45+
runs-on: ${{ matrix.os }}
4646
strategy:
4747
fail-fast: false
4848
matrix:
49-
target:
50-
- linux-x86_64
51-
- linux-aarch64
52-
- linux-riscv64
49+
# Each target builds on its native runner so the published tarball is a
50+
# real per-OS/per-arch artifact — the mesh fetches these instead of
51+
# building any 3rdparty lib from source on the deploy host.
52+
include:
53+
- { target: linux-x86_64, os: ubuntu-latest }
54+
- { target: linux-aarch64, os: ubuntu-latest }
55+
- { target: linux-riscv64, os: ubuntu-latest }
56+
- { target: macos-arm64, os: macos-14 }
57+
- { target: macos-x86_64, os: macos-13 }
58+
- { target: windows-x86_64, os: windows-latest }
5359
steps:
5460
- uses: actions/checkout@v4
5561

56-
- name: install build deps
62+
- name: install linux deps
63+
if: runner.os == 'Linux'
5764
run: |
5865
set -euo pipefail
5966
sudo apt-get update -y
@@ -64,7 +71,22 @@ jobs:
6471
esac
6572
sudo apt-get install -y --no-install-recommends $pkgs
6673
74+
- name: install macos deps
75+
if: runner.os == 'macOS'
76+
run: brew install ninja # cmake, clang, perl, make ship with the runner
77+
78+
- name: set up MSVC (windows)
79+
if: runner.os == 'Windows'
80+
uses: ilammy/msvc-dev-cmd@v1
81+
with:
82+
arch: x64
83+
84+
- name: install windows deps
85+
if: runner.os == 'Windows'
86+
run: choco install ninja -y --no-progress
87+
6788
- name: build libyaml for ${{ matrix.target }}
89+
shell: bash
6890
run: |
6991
mkdir -p out
7092
TARGET_PLATFORM="${{ matrix.target }}" \

0 commit comments

Comments
 (0)