-
Notifications
You must be signed in to change notification settings - Fork 17
77 lines (76 loc) · 2.43 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
67
68
69
70
71
72
73
74
75
76
77
name: CI
on: [pull_request, push]
jobs:
test:
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-20.04
java: 8
jobtype: 1
- os: macos-12
java: 8
jobtype: 1
- os: macos-14
java: 8
jobtype: 1
- os: windows-latest
java: 8
jobtype: 1
runs-on: ${{ matrix.os }}
env:
JAVA_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
JVM_OPTS: -Xms800M -Xmx2G -Xss6M -XX:ReservedCodeCacheSize=128M -server -Dsbt.io.virtual=false -Dfile.encoding=UTF-8
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup JDK
uses: actions/setup-java@v4
with:
distribution: zulu
java-version: "${{ matrix.java }}"
cache: sbt
- uses: sbt/setup-sbt@v1
- name: Set up MinGW
if: ${{ runner.os == 'Linux' }}
uses: egor-tensin/setup-mingw@v2
with:
platform: x64
- name: Set up gcc-aarch64-linux-gnu
if: ${{ runner.os == 'Linux' }}
shell: bash
run: sudo apt-get -y install gcc-aarch64-linux-gnu
- name: Build and test (Linux)
if: ${{ runner.os == 'Linux' }}
shell: bash
run: |
sbt "jvmfmtCheckAll; buildNativeArtifacts; test"
- name: Build and test (macOS)
if: ${{ runner.os == 'macOS' }}
shell: bash
run: sbt "buildNativeArtifacts; test"
- name: Build and test (Windows)
if: ${{ runner.os == 'Windows' }}
shell: bash
run: sbt "buildNativeArtifacts; test"
- name: Archive native artifacts (Linux)
if: ${{ runner.os == 'Linux' }}
uses: actions/upload-artifact@v4
with:
name: dist-${{ runner.os }}
path: |
src/main/resources/linux/x86_64/libsbtipcsocket.so
src/main/resources/linux/aarch64/libsbtipcsocket.so
src/main/resources/win32/x86_64/sbtipcsocket.dll
- name: Archive native artifacts (macOS)
if: ${{ matrix.os == 'macos-12' }}
uses: actions/upload-artifact@v4
with:
name: dist-${{ runner.os }}
path: src/main/resources/darwin/x86_64/libsbtipcsocket.dylib
- name: Test examples compilation
shell: bash
run: |
cd examples/echo-server
mvn package