Skip to content

Commit

Permalink
ci: Add macOS CI builds (#17)
Browse files Browse the repository at this point in the history
This change also introduces mise-en-place and `.tool-versions` to manage
Swift tool dependencies consistently on macOS and Linux.
  • Loading branch information
jbmorley authored Feb 13, 2025
1 parent 6895bad commit 2873791
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 29 deletions.
14 changes: 11 additions & 3 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,11 @@ on:
workflow_dispatch:

jobs:
ubuntu-build:
runs-on: ubuntu-latest
build:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:

- name: Checkout repository
Expand All @@ -21,6 +24,11 @@ jobs:
fetch-depth: 0
lfs: true

- name: Install the tool dependencies
uses: jdx/mise-action@v2
with:
experimental: true

- name: Build, test, and release
run: |
scripts/build-ubuntu.sh
scripts/build.sh
1 change: 1 addition & 0 deletions .tool-versions
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
swift 6.0
26 changes: 0 additions & 26 deletions scripts/build-ubuntu.sh

This file was deleted.

17 changes: 17 additions & 0 deletions scripts/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#!/usr/bin/env bash

set -e
set -o pipefail
set -x
set -u

# Remove the build directory if it exists to force a full rebuild.
if [ -d .build ] ; then
rm -rf .build
fi

# Run the tests.
swift test

# Build the project.
swift build

0 comments on commit 2873791

Please sign in to comment.