-
Notifications
You must be signed in to change notification settings - Fork 1
48 lines (43 loc) · 1.3 KB
/
fast-build-and-test-pipsqueak.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
# This workflow uses pipsqueak's Docker cache to do fast incremental build and
# testing runs. This workflow is meant to run fast to get results quickly after
# pushing commits or opening a PR. A more thorough build-from-scratch-and-test
# is run nightly.
name: Build and test on pipsqueak (fast)
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
cleaner:
runs-on: self-hosted
steps:
- name: Runner workspace path
run: |
echo "Cleaning up previous run"
rm -rf "${{ github.workspace }}"
build-and-test:
# Make sure we clean up the directory first. The runner does not remove
# files from old runs.
needs: cleaner
runs-on: self-hosted
steps:
- uses: actions/checkout@v2
with:
submodules: recursive
token: ${{ secrets.PAT }}
- name: Build the Docker image
id: build
run: |
export TAG=3la-docker:$(date +%s)
echo "::set-output name=TAG::$TAG"
eval `ssh-agent -s`
ssh-add
DOCKER_BUILDKIT=1 docker build \
. \
--file Dockerfile \
--ssh default \
--build-arg SSH_KEY="$(cat ~/.ssh/id_rsa)" \
--tag $TAG
- name: Run tests
run: docker run --env EVAL_TYPE=0 ${{ steps.build.outputs.TAG }} ./run.sh