feat: Support compilation of native deps on OS X 15. #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build dependencies | ||
on: | ||
push: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- 'deps/**' | ||
pull_request: | ||
branches: | ||
- main | ||
- master | ||
paths: | ||
- 'deps/**' | ||
workflow_dispatch: | ||
jobs: | ||
linux: | ||
name: Linux | ||
runs-on: ubuntu-22.04 | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install build tools | ||
run: | | ||
sudo apt-get update | ||
sudo apt-get install nasm python3 | ||
- name: Build deps | ||
run: | | ||
echo "Starting dependency build..." | ||
export MAKEFLAGS="-j$(nproc)" | ||
./deps/build-deps-linux.sh | ||
echo "Dependency build completed" | ||
- run: | | ||
git status | ||
git diff | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: false | ||
go-version: "1.23" | ||
- name: Build and test lilliput with the new deps | ||
run: | | ||
go build | ||
go test -v | ||
- name: Generate build info | ||
run: | | ||
./deps/verify_deps.py generate \ | ||
--deps-dir deps/linux \ | ||
--platform linux \ | ||
--commit ${{ github.sha }} | ||
- name: Create deps archive | ||
run: | | ||
tar -czf deps-linux.tar.gz deps/linux/ | ||
- name: Upload deps artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deps-linux.tar.gz | ||
path: deps-linux.tar.gz | ||
macos-14: | ||
name: macOS 14 | ||
runs-on: | ||
- macos-14 | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install build tools | ||
run: | | ||
brew install autoconf | ||
brew install automake | ||
brew install coreutils # for ffmpeg build | ||
brew install libtool | ||
- name: Build deps | ||
run: | | ||
echo "Starting dependency build..." | ||
export MAKEFLAGS="-j$(nproc)" | ||
./deps/build-deps-osx.sh | ||
echo "Dependency build completed" | ||
- run: | | ||
git status | ||
git diff | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: false | ||
go-version: "1.23" | ||
- name: Build and test lilliput with the new deps | ||
run: | | ||
go build | ||
go test -v | ||
- name: Generate build info | ||
run: | | ||
./deps/verify_deps.py generate \ | ||
--deps-dir deps/osx \ | ||
--platform macos \ | ||
--commit ${{ github.sha }} | ||
- name: Create deps archive | ||
run: | | ||
tar -czf deps-macos-14.tar.gz deps/osx/ | ||
- name: Upload deps artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deps-macos-14.tar.gz | ||
path: deps-macos-14.tar.gz | ||
macos-15: | ||
name: macOS 15 | ||
runs-on: | ||
- macos-15 | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Install build tools | ||
run: | | ||
brew install autoconf | ||
brew install automake | ||
brew install coreutils # for ffmpeg build | ||
brew install libtool | ||
- name: Build deps | ||
run: | | ||
echo "Starting dependency build..." | ||
export MAKEFLAGS="-j$(nproc)" | ||
./deps/build-deps-osx.sh | ||
echo "Dependency build completed" | ||
- run: | | ||
git status | ||
git diff | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
cache: false | ||
go-version: "1.23" | ||
- name: Build and test lilliput with the new deps | ||
run: | | ||
go build | ||
go test -v | ||
- name: Generate build info | ||
run: | | ||
./deps/verify_deps.py generate \ | ||
--deps-dir deps/osx \ | ||
--platform macos \ | ||
--commit ${{ github.sha }} | ||
- name: Create deps archive | ||
run: | | ||
tar -czf deps-macos-15.tar.gz deps/osx/ | ||
- name: Upload deps artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: deps-macos-15.tar.gz | ||
path: deps-macos-15.tar.gz | ||
verify: | ||
name: Verify Build Artifacts | ||
needs: [linux, macos] | ||
runs-on: ubuntu-latest | ||
if: github.event_name == 'pull_request' | ||
steps: | ||
- name: Check out repo | ||
uses: actions/checkout@v4 | ||
- name: Download Linux artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: deps-linux.tar.gz | ||
path: . | ||
- name: Download macOS artifact | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: deps-macos-14.tar.gz | ||
path: . | ||
- name: Extract artifacts | ||
run: | | ||
tar xzf deps-linux.tar.gz | ||
tar xzf deps-macos-14.tar.gz | ||
- name: Verify artifacts match checked-in deps | ||
run: | | ||
python3 ./deps/verify_deps.py verify \ | ||
--deps-dir deps/linux \ | ||
--build-info deps/linux/build-info.json | ||
python3 ./deps/verify_deps.py verify \ | ||
--deps-dir deps/osx \ | ||
--build-info deps/osx/build-info.json |