-
Notifications
You must be signed in to change notification settings - Fork 1
39 lines (33 loc) · 1.52 KB
/
gha.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
#
# The 'XXX_DISABLE_' suffix is used twice in this file to disable two actions:
# 1) XXX_DISABLE_${CI_FILE_PUSH_IMAGE_TO_REPO} - disables pushing the rebuilt Docker image and
# 2) XXX_DISABLE_AUTO_DOC_UPDATE - disables making pull requests with the update of documentation.
# Those two actions are disabled, because they conflict with the same ones run on Travis.
# Only one CI (Travis or GitHub Actions) can run them at the time, so they can be enabled here,
# when we decide to switch from Travis to GitHub Actions. The 'XXX_DISABLE_' suffix should be removed then.
#
name: RPMA
on: [push, pull_request]
env:
GITHUB_REPO: ldorau/librpma
DOCKERHUB_REPO: ldorau/librpma
jobs:
linux:
name: Linux
runs-on: ubuntu-latest
env:
HOST_WORKDIR: /home/runner/work/librpma/librpma
WORKDIR: utils/docker
strategy:
matrix:
CONFIG: ["N=1 OS=ubuntu OS_VER=19.10 TYPE=normal PUSH_IMAGE=1",
"N=2 OS=fedora OS_VER=31 TYPE=normal PUSH_IMAGE=1 XXX_DISABLE_AUTO_DOC_UPDATE=1"]
steps:
- name: Clone the git repo
uses: actions/checkout@v1
- name: Pull or rebuild the image
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./pull-or-rebuild-image.sh
- name: Run the build
run: cd $WORKDIR && ${{ matrix.CONFIG }} ./build.sh
- name: Push the image
run: cd $WORKDIR && source ./set-vars.sh && ${{ matrix.CONFIG }} /bin/bash -c "if [[ -f XXX_DISABLE_${CI_FILE_PUSH_IMAGE_TO_REPO} ]]; then images/push-image.sh $OS-$OS_VER; fi"