-
Notifications
You must be signed in to change notification settings - Fork 2
83 lines (72 loc) · 2.27 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"
jobs:
build:
name: CI on ${{matrix.os}} ${{matrix.segment}} out of 3
strategy:
fail-fast: false
matrix:
os: [macos-12, ubuntu-22.04]
segment: [1, 2, 3]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '17'
cache: sbt
- 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
- uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Setup for Scala Native
run: |
PLATFORM="$(uname)"
if [ $PLATFORM == "Darwin" ]; then
echo "It's a Mac"
brew install llvm@14 ninja
echo "LLVM_BIN=/usr/local/opt/llvm@14/bin" >> $GITHUB_ENV
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
echo "LLVM_BIN=/usr/lib/llvm-14/bin" >> $GITHUB_ENV
fi
- name: Setup for examples
run: |
PLATFORM="$(uname)"
if [ $PLATFORM == "Darwin" ]; then
python3 -m pip install packaging
else
docker run -p 5432:5432 -e POSTGRES_PASSWORD=mysecretpassword -d postgres
docker run -e MYSQL_ROOT_PASSWORD=my-secret-pw -e MYSQL_USER=mysql -e MYSQL_PASSWORD=mysql-password -e MYSQL_DATABASE=mysql_db -p 3306:3306 -d mysql
docker run -p 6379:6379 -d redis
fi
./manual_setup.sh
- name: Run examples
run: sbt 'runBatchedExamples ${{matrix.segment}} 3'
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"