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 GitHub
parent d604f72aac
commit e1daa63a86
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
4 changed files with 12 additions and 21 deletions

View File

@ -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.
@ -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:
@ -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:

View File

@ -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",
@ -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",

View File

@ -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",

View File

@ -20,9 +20,8 @@ from urllib.request import Request, urlopen, urlretrieve
# 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"