Skip to content

Commit

Permalink
ci: migrate macOS ARM builds to use GHA (#1419)
Browse files Browse the repository at this point in the history
* ci: migrate macOS ARM builds to use GHA

M1 macOS runners are now available on GHA, so we can use it instead of
CirrusCI for builds/CI.

* bump freebsd
  • Loading branch information
ClementTsang authored Mar 3, 2024
1 parent d604f72 commit e1daa63
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 21 deletions.
22 changes: 6 additions & 16 deletions .cirrus.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
%YAML 1.1
---
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and macOS M1, since other
# CI platforms don't seem to support these platforms as of writing (GH may support M1 soon though).
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and old versions of Linux,
# since other CI platforms don't support build jobs for these configurations.
#
# Note that we set the YAML directive above to prevent some linting errors around the templates.

Expand Down Expand Up @@ -50,10 +50,7 @@ test_task:
image_family: freebsd-14-0
- name: "FreeBSD 13 Test"
freebsd_instance:
image_family: freebsd-13-2
- name: "macOS M1 Test"
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
image_family: freebsd-13-3
<<: *SETUP_TEMPLATE
<<: *CACHE_TEMPLATE
test_no_feature_script:
Expand Down Expand Up @@ -88,19 +85,12 @@ build_task:
TARGET: "x86_64-unknown-freebsd"
NAME: "x86_64-unknown-freebsd-14-0"
- name: "FreeBSD 13 Build"
alias: "freebsd_13_2_build"
alias: "freebsd_13_3_build"
freebsd_instance:
image_family: freebsd-13-2
image_family: freebsd-13-3
env:
TARGET: "x86_64-unknown-freebsd"
NAME: "x86_64-unknown-freebsd-13-2"
- name: "macOS M1 Build"
alias: "macos_build"
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
env:
TARGET: "aarch64-apple-darwin"
NAME: "aarch64-apple-darwin"
NAME: "x86_64-unknown-freebsd-13-3"
- name: "Legacy Linux (2.17)"
alias: "linux_2_17_build"
container:
Expand Down
7 changes: 4 additions & 3 deletions .github/workflows/build_releases.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
matrix:
info:
# ======= Supported targets =======
# Linux (x64, x86, aarch64)
# Linux (x86-64, x86, aarch64)
- {
os: "ubuntu-20.04",
target: "x86_64-unknown-linux-gnu",
Expand Down Expand Up @@ -72,10 +72,11 @@ jobs:
cross: true,
}

# macOS (x64), M1 is built via CirrusCI.
# macOS (x86-64 and aarch64)
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }

# Windows (x64, x86)
# Windows (x86-64, x86)
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ jobs:
cross: true,
}
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }
- {
os: "windows-2019",
target: "x86_64-pc-windows-msvc",
Expand Down
3 changes: 1 addition & 2 deletions scripts/cirrus/build.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,8 @@

# Form of each task is (TASK_ALIAS, FILE_NAME).
TASKS: List[Tuple[str, str]] = [
("freebsd_13_2_build", "bottom_x86_64-unknown-freebsd-13-2.tar.gz"),
("freebsd_13_3_build", "bottom_x86_64-unknown-freebsd-13-3.tar.gz"),
("freebsd_14_0_build", "bottom_x86_64-unknown-freebsd-14-0.tar.gz"),
("macos_build", "bottom_aarch64-apple-darwin.tar.gz"),
("linux_2_17_build", "bottom_x86_64-unknown-linux-gnu-2-17.tar.gz"),
]
URL = "https://api.cirrus-ci.com/graphql"
Expand Down

0 comments on commit e1daa63

Please sign in to comment.