ci: migrate macOS ARM builds to use GHA (#1419)

* 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
This commit is contained in:
Clement Tsang 2024-03-03 01:17:14 -05:00 committed by ClementTsang
parent 0b72a58698
commit dad72a2562
No known key found for this signature in database
GPG Key ID: DC3B7867D8D97095
4 changed files with 12 additions and 21 deletions

View File

@ -1,7 +1,7 @@
%YAML 1.1 %YAML 1.1
--- ---
# Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and macOS M1, since other # Configuration for CirrusCI. This is primarily used for testing and building FreeBSD and old versions of Linux,
# CI platforms don't seem to support these platforms as of writing (GH may support M1 soon though). # 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. # Note that we set the YAML directive above to prevent some linting errors around the templates.
@ -50,10 +50,7 @@ test_task:
image_family: freebsd-14-0 image_family: freebsd-14-0
- name: "FreeBSD 13 Test" - name: "FreeBSD 13 Test"
freebsd_instance: freebsd_instance:
image_family: freebsd-13-2 image_family: freebsd-13-3
- name: "macOS M1 Test"
macos_instance:
image: ghcr.io/cirruslabs/macos-monterey-base:latest
<<: *SETUP_TEMPLATE <<: *SETUP_TEMPLATE
<<: *CACHE_TEMPLATE <<: *CACHE_TEMPLATE
test_no_feature_script: test_no_feature_script:
@ -88,19 +85,12 @@ build_task:
TARGET: "x86_64-unknown-freebsd" TARGET: "x86_64-unknown-freebsd"
NAME: "x86_64-unknown-freebsd-14-0" NAME: "x86_64-unknown-freebsd-14-0"
- name: "FreeBSD 13 Build" - name: "FreeBSD 13 Build"
alias: "freebsd_13_2_build" alias: "freebsd_13_3_build"
freebsd_instance: freebsd_instance:
image_family: freebsd-13-2 image_family: freebsd-13-3
env: env:
TARGET: "x86_64-unknown-freebsd" TARGET: "x86_64-unknown-freebsd"
NAME: "x86_64-unknown-freebsd-13-2" NAME: "x86_64-unknown-freebsd-13-3"
- 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: "Legacy Linux (2.17)" - name: "Legacy Linux (2.17)"
alias: "linux_2_17_build" alias: "linux_2_17_build"
container: container:

View File

@ -39,7 +39,7 @@ jobs:
matrix: matrix:
info: info:
# ======= Supported targets ======= # ======= Supported targets =======
# Linux (x64, x86, aarch64) # Linux (x86-64, x86, aarch64)
- { - {
os: "ubuntu-20.04", os: "ubuntu-20.04",
target: "x86_64-unknown-linux-gnu", target: "x86_64-unknown-linux-gnu",
@ -72,10 +72,11 @@ jobs:
cross: true, 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-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", os: "windows-2019",
target: "x86_64-pc-windows-msvc", target: "x86_64-pc-windows-msvc",

View File

@ -78,6 +78,7 @@ jobs:
cross: true, cross: true,
} }
- { os: "macos-12", target: "x86_64-apple-darwin", cross: false } - { os: "macos-12", target: "x86_64-apple-darwin", cross: false }
- { os: "macos-14", target: "aarch64-apple-darwin", cross: false }
- { - {
os: "windows-2019", os: "windows-2019",
target: "x86_64-pc-windows-msvc", target: "x86_64-pc-windows-msvc",

View File

@ -20,9 +20,8 @@ from urllib.request import Request, urlopen, urlretrieve
# Form of each task is (TASK_ALIAS, FILE_NAME). # Form of each task is (TASK_ALIAS, FILE_NAME).
TASKS: List[Tuple[str, str]] = [ 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"), ("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"), ("linux_2_17_build", "bottom_x86_64-unknown-linux-gnu-2-17.tar.gz"),
] ]
URL = "https://api.cirrus-ci.com/graphql" URL = "https://api.cirrus-ci.com/graphql"