Skip to content

Commit 99bca0d

Browse files
committed
feat: Switch to self-hosted macos arm64 runner
1 parent dc9f5ea commit 99bca0d

File tree

2 files changed

+49
-33
lines changed

2 files changed

+49
-33
lines changed
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: Setup ubuntu
2+
description: Setup ubuntu
3+
4+
inputs:
5+
packages:
6+
description: Space-separated list of additional packages to install
7+
required: false
8+
default: 'cmake'
9+
10+
runs:
11+
using: composite
12+
steps:
13+
- name: Set up Homebrew
14+
id: set-up-homebrew
15+
uses: Homebrew/actions/setup-homebrew@master
16+
- name: Set up Python
17+
uses: actions/setup-python@v4
18+
with:
19+
python-version: '3.11'
20+
- name: Install LLVM and Clang
21+
uses: KyleMayes/install-llvm-action@v2
22+
with:
23+
version: "18"
24+
- name: Install additional packages
25+
if: ${{ inputs.packages != ''}}
26+
shell: bash
27+
run: |
28+
brew install ${{ inputs.packages }}
29+
- name: Setup Python venv
30+
shell: bash
31+
run: |
32+
python3 -m venv venv
33+
source venv/bin/activate
34+
python3 -m pip install -r requirements.txt
35+
deactivate
36+
echo "$(pwd)/venv/bin/" >> "$GITHUB_PATH"

.github/workflows/test_basic.yaml

Lines changed: 13 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77
jobs:
88
examples_dry_run:
99
name: Dry Run (${{ matrix.target }})
10-
runs-on: ubuntu-latest
10+
runs-on: [self-hosted, macOS, ARM64]
1111
strategy:
1212
matrix:
1313
target:
@@ -21,67 +21,47 @@ jobs:
2121
- slothy.targets.aarch64.aarch64_big_experimental
2222
steps:
2323
- uses: actions/checkout@v3
24-
- uses: ./.github/actions/setup-ubuntu
24+
- uses: ./.github/actions/setup-macos
2525
- name: Run examples
2626
run: |
2727
python3 example.py --dry-run --only-target=${{ matrix.target }}
28-
tests:
29-
name: Tests (${{ matrix.target }})
30-
runs-on: ubuntu-latest
31-
strategy:
32-
matrix:
33-
target:
34-
- slothy.targets.arm_v7m.cortex_m7
35-
- slothy.targets.arm_v81m.cortex_m55r1
36-
- slothy.targets.arm_v81m.cortex_m85r1
37-
- slothy.targets.aarch64.cortex_a55
38-
- slothy.targets.aarch64.cortex_a72_frontend
39-
- slothy.targets.aarch64.apple_m1_firestorm_experimental
40-
- slothy.targets.aarch64.apple_m1_icestorm_experimental
41-
- slothy.targets.aarch64.aarch64_big_experimental
42-
steps:
43-
- uses: actions/checkout@v3
44-
- uses: ./.github/actions/setup-ubuntu
45-
- name: Run tests
46-
run: |
47-
python3 test.py --only-target=${{ matrix.target }}
4828
tutorial:
49-
runs-on: ubuntu-latest
29+
runs-on: [self-hosted, macOS, ARM64]
5030
steps:
5131
- uses: actions/checkout@v3
52-
- uses: ./.github/actions/setup-ubuntu
32+
- uses: ./.github/actions/setup-macos
5333
- name: Run tutorial
5434
run: |
5535
(cd tutorial && ./tutorial_all.sh)
5636
examples_basic:
57-
runs-on: ubuntu-latest
37+
runs-on: [self-hosted, macOS, ARM64]
5838
steps:
5939
- uses: actions/checkout@v3
60-
- uses: ./.github/actions/setup-ubuntu
40+
- uses: ./.github/actions/setup-macos
6141
- name: Run examples
6242
run: |
63-
python3 test.py --tests simple0_m55,simple1_m55,simple0_loop_m55,simple1_loop_m55
43+
python3 example.py --examples simple0,simple1,simple0_loop,simple1_loop
6444
regression:
65-
runs-on: ubuntu-latest
45+
runs-on: [self-hosted, macOS, ARM64]
6646
steps:
6747
- uses: actions/checkout@v3
6848
- uses: ./.github/actions/setup-ubuntu
6949
- name: Run regression tests
7050
run: |
7151
python3 regression.py --iterations 5
7252
sqmag:
73-
runs-on: ubuntu-latest
53+
runs-on: [self-hosted, macOS, ARM64]
7454
steps:
7555
- uses: actions/checkout@v3
76-
- uses: ./.github/actions/setup-ubuntu
56+
- uses: ./.github/actions/setup-macos
7757
- name: Run examples
7858
run: |
7959
(cd paper/scripts && NO_LOG=Y ./slothy_sqmag.sh)
8060
fft:
81-
runs-on: ubuntu-latest
61+
runs-on: [self-hosted, macOS, ARM64]
8262
steps:
8363
- uses: actions/checkout@v3
84-
- uses: ./.github/actions/setup-ubuntu
64+
- uses: ./.github/actions/setup-macos
8565
- name: Run examples
8666
run: |
87-
(cd paper/scripts && NO_LOG=Y ./slothy_fft.sh)
67+
(cd paper/scripts && NO_LOG=Y ./slothy_fft.sh)

0 commit comments

Comments
 (0)