forked from redpanda-data/redpanda
-
Notifications
You must be signed in to change notification settings - Fork 0
55 lines (48 loc) · 1.57 KB
/
redpanda-build.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
# Copyright 2020 Redpanda Data, Inc.
#
# Use of this software is governed by the Business Source License
# included in the file licenses/BSL.md
#
# As of the Change Date specified in that file, in accordance with
# the Business Source License, use of this software will be governed
# by the Apache License, Version 2.0
name: build-test
on: [push, pull_request]
jobs:
build:
name: build redpanda
runs-on: ubuntu-20.04
steps:
- name: checkout
uses: actions/checkout@v2
- name: prepare toolchain container
run: |
docker pull docker.io/vectorized/redpanda-toolchain || true
chmod 0775 install-dependencies.sh
cp tools/docker/Dockerfile.ignore .dockerignore
docker build \
--cache-from docker.io/vectorized/redpanda-toolchain \
--tag rp-toolchain \
--file tools/docker/Dockerfile \
.
rm .dockerignore
- name: ccache cache files
uses: actions/cache@v2
with:
path: /dev/shm/redpanda
key: ccache-${{github.ref}}
restore-keys: ccache
- name: set fx.aio-max-nr
run: sudo sysctl -w fs.aio-max-nr=10485760
- name: build & test
run: |
docker run --rm \
-e CCACHE_COMPRESS=true \
-e CCACHE_COMPRESSLEVEL=6 \
-e CCACHE_MAXSIZE=200M \
--privileged \
--ipc=host \
-v $PWD:$PWD \
-w $PWD \
rp-toolchain \
./build.sh