-
Notifications
You must be signed in to change notification settings - Fork 6
125 lines (113 loc) · 3.38 KB
/
push.yaml
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
120
121
122
123
124
125
name: Push
on:
push:
branches:
- master
tags:
- 'v*'
jobs:
build_linux:
runs-on: ubuntu-latest
strategy:
fail-fast: true
matrix:
target:
[
bionic_x64,
bionic_arm64,
bionic_armhf,
focal_x64,
focal_arm64,
focal_armhf,
jammy_x64,
jammy_arm64,
jammy_armhf,
]
steps:
- name: Info
env:
GITHUB_EVENT: ${{ toJson(github.event) }}
run: |
TZ=UTC date
TZ=Asia/Seoul date
echo "event_name = ${{ github.event_name }}"
echo "ref = ${{ github.ref }}"
- name: Check out the repo
uses: actions/checkout@v4
with:
submodules: true
fetch-depth: 0
- name: Build
run: |
whoami
pwd
ls -la
cd ..
pwd
ls -la
chmod 777 $PWD
chmod 777 $PWD/nugu-linux
ls -la
ls -la $PWD/nugu-linux
docker run -t --rm --privileged \
-v $PWD:$PWD \
-v /var/lib/schroot/chroots \
-w $PWD/nugu-linux \
nugulinux/buildenv:${{ matrix.target }} \
sdkbuild.sh
ls -la
mkdir /tmp/result
cp *.deb /tmp/result/
- name: Build artifacts
uses: actions/upload-artifact@v4
with:
name: deb-${{ matrix.target }}
path: /tmp/result/
- name: Upload artifact to release
if: startsWith(github.ref, 'refs/tags/v')
uses: svenstaro/upload-release-action@v2
with:
file: /tmp/result/*
file_glob: true
repo_token: ${{ github.token }}
overwrite: true
tag: ${{ github.ref }}
blackduck:
runs-on: ubuntu-latest
steps:
- name: Check out the repo
uses: actions/checkout@v4
- name: Prepare
run: |
# Use only njson submodule
git submodule update --init externals/njson
# generate.sh script
cat <<EOF > generate.sh
#!/bin/sh
mkdir build && cd build
cmake .. -DENABLE_BUILTIN_CURL=OFF -DCMAKE_INSTALL_PREFIX=/usr
cd ..
cp build/compile_commands.json .
cp build/nugu.pc .
rm -rf build
EOF
# Run cmake in docker container
chmod +x generate.sh
docker run -t --rm -v $PWD:$PWD -w $PWD \
nugulinux/devenv:jammy ./generate.sh
# Get version from pc file
VERSION=`pkg-config --modversion ./nugu.pc`
echo "version=${VERSION}" >> $GITHUB_ENV
- name : Black Duck Synopsys Detect
run: |
bash <(curl -s -L https://detect.synopsys.com/detect8.sh) \
--blackduck.url="${{ secrets.BLACKDUCK_URL }}" \
--blackduck.api.token="${{ secrets.BLACKDUCK_API_TOKEN }}" \
--blackduck.trust.cert=true \
--detect.project.name="${{ secrets.BLACKDUCK_PROJECT_NAME }}" \
--detect.project.version.name="${{ env.version }}" \
--detect.source.path="./" \
--detect.blackduck.signature.scanner.snippet.matching=SNIPPET_MATCHING \
--detect.blackduck.signature.scanner.upload.source.mode=true \
--detect.clone.project.version.latest=true \
--detect.project.tags=TYPE_sdk