forked from Blaok/fpga-runtime
-
Notifications
You must be signed in to change notification settings - Fork 0
81 lines (77 loc) · 2.17 KB
/
package.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
name: package
on:
push:
tags:
- "*"
branches-ignore:
- "**/docs?"
pull_request:
branches-ignore:
- "**/docs?"
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
steps:
- name: Checkout myself
uses: actions/checkout@v2
- name: Install build dependencies
run: |
# https://bugs.launchpad.net/ubuntu/+source/google-glog/+bug/1991919
sudo apt-get install -y libunwind-15-dev || true
sudo apt-get install -y \
libgflags-dev \
libgoogle-glog-dev \
libtinyxml-dev \
opencl-headers \
./.github/scripts/install-xrt.sh
- name: Configure myself
run: cmake -S . -B build -D CMAKE_BUILD_TYPE=Release
- name: Build myself
run: cmake --build build --target all
- name: Test myself
run: ctest --exclude-regex '.*-co?sim'
working-directory: build
- name: Package myself
run: cmake --build build --target package
- name: Upload deb package
uses: actions/upload-artifact@v3
with:
name: frt-${{ matrix.os }}
path: build/*.deb
release:
if: github.event_name == 'push' && github.repository == 'Blaok/fpga-runtime' && startsWith(github.event.ref, 'refs/tags')
runs-on: ${{ matrix.os }}
concurrency: release
strategy:
matrix:
os:
- ubuntu-20.04
- ubuntu-22.04
needs:
- build
steps:
- name: Checkout myself
uses: actions/checkout@v3
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: frt-${{ matrix.os }}
path: build
- name: Cache APT database
uses: actions/cache@v3
with:
path: apt-db-cache
key: ${{ runner.os }}-apt-db-cache
- name: Update APT repository
run: ./.github/scripts/upload-apt-repo.sh
env:
BUILD_DIR: build
CACHE_DIR: apt-db-cache
LABEL: FPGA Runtime Repository
GPG_KEY: ${{ secrets.GPG_KEY }}
SSH_KEY: ${{ secrets.SSH_KEY }}