-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (73 loc) · 2.22 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
78
79
80
81
82
83
name: CI
on:
push:
branches: ["main"]
tags: ["v*"]
pull_request:
branches: ["*"]
env:
JAVA_OPTS: "-Xmx4G -Dsbt.task.timings=true -Dsbt.task.timings.on.shutdown=true"
jobs:
build:
name: CI on ${{matrix.os}} ${{matrix.segment}} out of 3
strategy:
fail-fast: false
matrix:
os: [macos-11, ubuntu-20.04]
segment: [1, 2, 3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v2
with:
distribution: 'temurin'
java-version: '17'
- name: Cache vcpkg
uses: actions/cache@v3
with:
path: |
~/Library/Caches/sbt-vcpkg/vcpkg-install
~/Library/Caches/sbt-vcpkg/vcpkg
~/.cache/sbt-vcpkg/vcpkg-install
~/.cache/sbt-vcpkg/vcpkg
key: ${{ runner.os }}-sbt-vcpkg-${{ matrix.segment }}
- uses: rui314/setup-mold@v1
- name: Setup for Scala Native
run: |
PLATFORM="$(uname)"
if [ $PLATFORM == "Darwin" ]; then
echo "It's a Mac"
brew install llvm@14 ninja
else
echo "It's a Linux"
wget https://apt.llvm.org/llvm.sh
chmod +x llvm.sh
sudo ./llvm.sh 14
sudo apt-get install ninja-build
fi
- name: Setup for examples
run: |
./manual_setup.sh
PLATFORM="$(uname)"
if [ $PLATFORM == "Darwin" ]; then
echo "It's a Mac"
else
docker run -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
docker run -p 6379:6379 -d redis
fi
- name: Run examples
run: |
PLATFORM="$(uname)"
if [ $PLATFORM == "Darwin" ]; then
echo "It's a Mac"
LLVM_BIN=/usr/local/opt/llvm@14/bin sbt 'runBatchedExamples ${{matrix.segment}} 3'
else
echo "It's a Linux"
LLVM_BIN=/usr/lib/llvm-14/bin sbt 'runBatchedExamples ${{matrix.segment}} 3'
fi
mergify-build-checkpoint:
runs-on: ubuntu-latest
needs: [build]
steps:
- name: I only exist to please Mergify :(
run: echo "It's a sad existence but necessary"