forked from QBDI/QBDI
-
Notifications
You must be signed in to change notification settings - Fork 0
121 lines (113 loc) · 3.75 KB
/
linux.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
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
name: Tests and Package Linux
on:
push:
branches:
- master
- dev-next
pull_request:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
QBDI_ARCH: ['X86_64', 'X86']
fail-fast: false
env:
QBDI_PLATFORM: 'linux'
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache ccache
uses: actions/cache@v3
id: cache-ccache
with:
path: |
~/.ccache
key: ccache-linux-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-${{ github.run_number }}
restore-keys: |
ccache-linux-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-
- if: steps.cache-ccache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.ccache
cp .github/workflows/ccache.conf ~/.ccache/ccache.conf
- name: Cache third-party
uses: actions/cache@v3
with:
path: |
third-party
key: QBDI-third-party-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }}
- name: Cache test result
uses: actions/cache@v3
with:
path: |
tools/validation_runner/travis_db
key: test-linux-${{ matrix.QBDI_ARCH }}
- name: Create build image
env:
QBDI_ARCH: ${{ matrix.QBDI_ARCH }}
run: bash ./docker/ci_linux/img_build.sh
- name: Build and test QBDI
env:
QBDI_ARCH: ${{ matrix.QBDI_ARCH }}
run: bash ./docker/ci_linux/qbdi.sh
- name: Export package
uses: actions/upload-artifact@v3
with:
name: package_linux_${{ matrix.QBDI_ARCH }}
path: build/QBDI-*-linux-${{ matrix.QBDI_ARCH }}.tar.gz
build_ARM_AARCH64:
runs-on: ubuntu-latest
strategy:
matrix:
QBDI_ARCH: ['AARCH64', 'ARM']
fail-fast: false
env:
QBDI_PLATFORM: 'linux'
steps:
- name: checkout
uses: actions/checkout@v3
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Cache ccache
uses: actions/cache@v3
id: cache-ccache
with:
path: |
~/.ccache
key: ccache-linux-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-${{ github.run_number }}
restore-keys: |
ccache-linux-${{ matrix.QBDI_ARCH }}-${{ hashFiles('.github/workflows/ccache.conf') }}-
- if: steps.cache-ccache.outputs.cache-hit != 'true'
run: |
mkdir -p ~/.ccache
cp .github/workflows/ccache.conf ~/.ccache/ccache.conf
- name: Cache third-party
uses: actions/cache@v3
with:
path: |
third-party
key: QBDI-third-party-${{ hashFiles('**/CMakeLists.txt') }}-${{ hashFiles('**/*.cmake') }}
- name: Cache test result
uses: actions/cache@v3
with:
path: |
tools/validation_runner/travis_db
key: test-linux-${{ matrix.QBDI_ARCH }}
- name: Create build image
run: bash ./docker/ci_linux_arm/images/img_build.sh ${{ matrix.QBDI_ARCH }}
- name: Build and test QBDI
run: bash ./docker/ci_linux_arm/build_qbdi_linux.sh ${{ matrix.QBDI_ARCH }}
- name: Export package
uses: actions/upload-artifact@v3
with:
name: package_linux_${{ matrix.QBDI_ARCH }}
path: build-docker-*/QBDI-*-linux-*.tar.gz