-
Notifications
You must be signed in to change notification settings - Fork 26
42 lines (41 loc) · 1.4 KB
/
remote-debug-example.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
name: Build remote-debug-example application
on:
workflow_dispatch:
push:
paths:
- 'remote-debug-example/**'
- '!remote-debug-example/README.md'
- '.github/workflows/remote-debug-example.yml'
jobs:
test-app:
name: Test app
runs-on: ubuntu-latest
strategy:
matrix:
axis-os: ["12.2.52"]
arch: ["armv7hf", "aarch64"]
env:
EXREPO: acap-native-examples
EXNAME: remote-debug-example
GDBSERVER: gdbserver
steps:
- uses: actions/checkout@v4
- uses: docker/setup-buildx-action@v3
- name: Build ${{ env.EXNAME }} application and dev container
env:
imagetag: ${{ env.EXREPO }}_${{ env.EXNAME }}_dev-container:${{ matrix.arch }}
gdbserver_dir: ${{ env.GDBSERVER }}-${{ matrix.arch }}
run: |
docker image rm -f $imagetag
cd $EXNAME
docker build --no-cache --tag $imagetag --build-arg ARCH=${{ matrix.arch }} .
# Copy out application
docker cp $(docker create $imagetag):/opt/app ./build
# Copy out gdbserver, control it exist and is non-zero
docker cp $(docker create $imagetag):/opt/build/gdb/bin ./$gdbserver_dir
[ -s ./$gdbserver_dir/${{ env.GDBSERVER }} ] || {
echo "${{ env.GDBSERVER }} in $gdbserver_dir is not available"
exit 1
}
cd ..
docker image rm -f $imagetag