Skip to content

Commit

Permalink
Switch to using Github's runners for macOS builds
Browse files Browse the repository at this point in the history
Those are now available, and though a tad slower than our current hosted
runners, allow us to avoid having to maintain hosted macOS runners.
  • Loading branch information
elprans authored and fantix committed Apr 3, 2024
1 parent bcdc0b1 commit 207543a
Show file tree
Hide file tree
Showing 8 changed files with 417 additions and 325 deletions.
43 changes: 28 additions & 15 deletions .github/workflows.src/build.inc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
<% endfor %>
<% endif %>
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: true

Expand Down Expand Up @@ -88,7 +88,7 @@
<% endif %>

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
Expand Down Expand Up @@ -117,7 +117,7 @@
PKG_PLATFORM_LIBC: "<< tgt.platform_libc >>"
<% endif %>

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>/
Expand All @@ -132,17 +132,30 @@
<% endif %>

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
path: edgedb-pkg

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@55c7845fad90d0ae8b2e83715cb900e5e861e8cb
uses: dtolnay/rust-toolchain@be73d7920c329f220ce78e0234b8f96b7ae60248
if: << 'false' if tgt.runs_on and 'self-hosted' in tgt.runs_on else 'true' >>
with:
toolchain: stable
components: "cargo,rustc,rust-std"
toolchain: "stable"
targets: "<< tgt.arch >>-apple-darwin"

- name: Set up Python
uses: actions/setup-python@v5
if: << 'false' if tgt.runs_on and 'self-hosted' in tgt.runs_on else 'true' >>
with:
python-version: "3.x"

- name: Install dependencies
if: << 'false' if tgt.runs_on and 'self-hosted' in tgt.runs_on else 'true' >>
run: |
env HOMEBREW_NO_AUTO_UPDATE=1 brew install libmagic
- name: Build
env:
Expand All @@ -165,7 +178,7 @@
run: |
edgedb-pkg/integration/macos/build.sh
- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>/
Expand All @@ -180,7 +193,7 @@
<% endif %>

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
Expand Down Expand Up @@ -232,7 +245,7 @@
password: "${{ secrets.WIN_CODE_SIGNING_CERT_PASSWORD }}"
folder: "artifacts/<< plat_id >>/"

- uses: actions/upload-artifact@v3
- uses: actions/upload-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>
Expand All @@ -244,7 +257,7 @@
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>/
Expand Down Expand Up @@ -274,7 +287,7 @@
runs-on: << tgt.runs_on if tgt.runs_on else "ubuntu-latest" >>

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>/
Expand Down Expand Up @@ -309,12 +322,12 @@
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
Expand Down Expand Up @@ -344,12 +357,12 @@
runs-on: ubuntu-latest

steps:
- uses: actions/download-artifact@v3
- uses: actions/download-artifact@v4
with:
name: builds-<< tgt.name >>
path: artifacts/<< plat_id >>

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
repository: edgedb/edgedb-pkg
ref: master
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows.src/build.targets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -117,12 +117,13 @@ targets:
platform_version: x86_64
family: generic
arch: x86_64
runs_on: [macos-14]
- name: macos-aarch64
platform: macos
platform_version: aarch64
family: generic
arch: aarch64
runs_on: [self-hosted, macOS, ARM64]
runs_on: [macos-14]

win:
- name: win-x86_64
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/install_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
env:
RUST_BACKTRACE: 1
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install musl-tools
run: "sudo apt-get install musl-tools"
- name: Systemd version
Expand Down Expand Up @@ -43,7 +43,7 @@ jobs:
matrix:
os: [windows-2019, macos-latest]
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- uses: actions-rs/toolchain@v1
with:
profile: minimal
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/nightly-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- upgrade
- project
steps:
- uses: actions/checkout@master
- uses: actions/checkout@v4
- name: Install musl-tools
run: "sudo apt-get install musl-tools"
- uses: actions-rs/toolchain@v1
Expand Down
Loading

0 comments on commit 207543a

Please sign in to comment.