-
-
Notifications
You must be signed in to change notification settings - Fork 16
66 lines (56 loc) · 2.46 KB
/
ci.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
56
57
58
59
60
61
62
63
64
65
66
name: CI Build
on:
push:
paths-ignore:
- 'mkdocs.yml'
- 'docs/**'
branches-ignore:
- autobahn-tests/ios
pull_request:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
# Windows hosts don't support linux containers yet (https://github.com/actions/virtual-environments/issues/1143)
os: [ ubuntu-latest, macos-latest ]
jdk-version: [ 11, 17 ]
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up JDK ${{ matrix.jdk-version }}
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: ${{ matrix.jdk-version }}
# Docker is not installed on GitHub's MacOS hosted workers due to licensing issues
# (and it's necessary to run Autobahn tests)
- name: Setup docker and docker-compose (missing on MacOS)
if: runner.os == 'macos'
run: |
# Workaround for https://github.com/actions/runner-images/issues/8104
brew remove --ignore-dependencies qemu
curl -o ./qemu.rb https://raw.githubusercontent.com/Homebrew/homebrew-core/dc0669eca9479e9eeb495397ba3a7480aaa45c2e/Formula/qemu.rb
brew install ./qemu.rb
brew install docker docker-compose
# Link the Docker Compose v2 plugin so it's understood by the docker CLI
mkdir -p ~/.docker/cli-plugins
ln -sfn /usr/local/opt/docker-compose/bin/docker-compose ~/.docker/cli-plugins/docker-compose
# Using mount-type 9p to allow the containers launched via docker-compose to chown
# https://github.com/abiosoft/colima/issues/54#issuecomment-1250217077
colima start --mount-type 9p
# Loosen permissions for directories mounted in containers to workaround permission issues that remain
# when using the 9p filesystem (https://github.com/joffrey-bion/krossbow/issues/282)
chmod 777 autobahn-tests/test-server/config
mkdir -p autobahn-tests/build/autobahn/reports
chmod 777 autobahn-tests/build/autobahn/reports
- name: Build with Gradle
uses: gradle/gradle-build-action@v2
with:
arguments: build
- name: Upload Autobahn reports
uses: actions/upload-artifact@v3
if: failure()
with:
name: autobahn-reports-${{ runner.os }}-jdk${{ matrix.jdk-version }}
path: autobahn-tests/build/autobahn/reports/clients