-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.58 KB
/
Copy pathbuild.yml
File metadata and controls
58 lines (48 loc) · 1.58 KB
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
name: Build
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
env:
RUNNER_ARCH_MAP: '[{"amd64":"x86_64", "arm64":"aarch64", "arm":"armv7l"}]'
GO_ARCH_MAP: '[{"amd64":"amd64", "arm64":"arm64", "arm":"armv6l"}]'
DEB_ARCH_MAP: '[{"amd64":"amd64", "arm64":"arm64", "arm":"armhf"}]'
jobs:
build:
runs-on: ${{ format('{0}-{1}', 'base-dind-2204', matrix.arch) }}
strategy:
matrix:
arch: [amd64, arm64, arm]
build-type: [release]
fail-fast: false
permissions:
contents: read
pull-requests: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set arch variables
run: |
echo "ARCH=${{ fromJson(env.RUNNER_ARCH_MAP)[0][matrix.arch] }}" >> "$GITHUB_ENV"
echo "DEB_ARCH=${{ fromJson(env.DEB_ARCH_MAP)[0][matrix.arch] }}" >> "$GITHUB_ENV"
- name: Display Go version
run: |
go version
- name: Install vaccel
run: |
wget "https://s3.nbfc.io/nbfc-assets/github/vaccel/rev/main/${{ env.ARCH }}/release/vaccel_latest_${{ env.DEB_ARCH }}.deb"
sudo dpkg -i vaccel_latest_${{ env.DEB_ARCH }}.deb
rm vaccel_latest_${{ env.DEB_ARCH }}.deb
sudo ldconfig
- name: Build binaries
run: make
- name: Test binaries
env:
VACCEL_LOG_LEVEL: 4
VACCEL_PLUGINS: libvaccel-noop.so
run: |
./bin/noop
./bin/classify "$(pkg-config --variable=prefix vaccel)/share/vaccel/images/example.jpg"
./bin/exec "$(pkg-config --variable=libdir vaccel)/libmytestlib.so" 10