-
-
Notifications
You must be signed in to change notification settings - Fork 220
94 lines (79 loc) · 2.17 KB
/
main.yaml
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
84
85
86
87
88
89
90
91
92
93
name: CI
on:
push:
paths-ignore:
- 'docs/**'
branches:
- main
pull_request:
paths-ignore:
- 'docs/**'
branches:
- '*'
workflow_call:
inputs:
build_multiarch:
default: false
required: true
type: boolean
jobs:
test-containers:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v3
- name: Free up disk space
if: ${{ inputs.build_multiarch }}
uses: jlumbroso/free-disk-space@main
with:
android: true
dotnet: true
haskell: true
large-packages: true
swap-storage: true
- name: Install GraphViz
run: sudo apt-get install graphviz -y
- name: Set up JDK 11
uses: actions/setup-java@v3
with:
java-version: 11
distribution: temurin
- name: Build Java server
run: make buildServer
- name: Set up QEMU
if: ${{ inputs.build_multiarch }}
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
config-inline: |
[worker.oci]
max-parallelism = 2
- name: Cache Docker layers
uses: actions/cache@v3
with:
path: /tmp/.buildx-cache
key: ${{ runner.os }}-buildx-${{ github.sha }}
restore-keys: |
${{ runner.os }}-buildx-
- name: Build container images
run: make buildDockerImages
env:
BUILD_MULTIARCH: ${{ inputs.build_multiarch }}
CACHE_FROM: 'type=local,src=/tmp/.buildx-cache'
CACHE_TO: 'type=local,dest=/tmp/.buildx-cache-new'
- name: 'Setup Node.js 16'
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Install Node dependencies
run: npm install
- name: Run smoke tests
run: make smokeTests
# This ugly bit is necessary if you don't want your cache to grow forever until it hits GitHub's limit of 5GB.
# Temp fix
# https://github.com/docker/build-push-action/issues/252
# https://github.com/moby/buildkit/issues/1896
- name: Move cache
run: |
rm -rf /tmp/.buildx-cache
mv /tmp/.buildx-cache-new /tmp/.buildx-cache