-
-
Notifications
You must be signed in to change notification settings - Fork 8
55 lines (46 loc) · 1.69 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
name: CI Build
on: [push, pull_request]
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-12] # macos-latest uses ARM which doesn't support virtualization
jdk-version: [21]
steps:
- name: Checkout repository
uses: actions/checkout@v4
# It seems we can't control whether macos-12 runners are intel or arm64
- name: Check architecture for nested virtualization on macOS
if: runner.os == 'macos'
shell: bash
run: |
if [ $(uname -m) != "x86_64" ]
then
echo "$(uname -m) detected. This test must be run on x86_64"
exit -1
fi
exit 0
# Docker is not installed on GitHub's MacOS hosted workers due to licensing issues
- name: Setup docker (missing on MacOS)
if: runner.os == 'macos'
run: |
brew install docker
colima start
# For testcontainers to find the Colima socket
# https://github.com/abiosoft/colima/blob/main/docs/FAQ.md#cannot-connect-to-the-docker-daemon-at-unixvarrundockersock-is-the-docker-daemon-running
sudo ln -sf $HOME/.colima/default/docker.sock /var/run/docker.sock
- name: Set up JDK ${{ matrix.jdk-version }}
uses: actions/setup-java@v4
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk-version }}
- name: Cache Kotlin/Native binaries
uses: actions/cache@v4
with:
path: ~/.konan
key: konan-${{ runner.os }}
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v4
- name: Build with Gradle
run: ./gradlew build