forked from ctu-mrs/mrs_uav_px4_api
-
Notifications
You must be signed in to change notification settings - Fork 0
98 lines (71 loc) · 2.35 KB
/
ros_build_test.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
name: ros_build_test
on:
push:
pull_request:
workflow_dispatch:
# concurrency:
# group: ${{ github.ref }}
# cancel-in-progress: true
jobs:
build_amd64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: .ci_scripts
- name: Update submodules
run: |
sudo pip3 install -U gitman
[[ -e .gitman.yml || -e .gitman.yaml ]] && [[ ! -e .gitman_ignore ]] && gitman install || echo "no gitman modules to install"
- name: Build
run: |
mkdir -p /tmp/artifacts
.ci_scripts/package_build/build_package.sh $GITHUB_WORKSPACE /tmp/artifacts
build_arm64:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
submodules: 'recursive'
- name: Checkout CI scripts
uses: actions/checkout@v3
with:
repository: ctu-mrs/ci_scripts
ref: master
path: .ci_scripts
- name: Update submodules
run: |
sudo pip3 install -U gitman
[[ -e .gitman.yml || -e .gitman.yaml ]] && [[ ! -e .gitman_ignore ]] && gitman install || echo "no gitman modules to install"
- uses: ctu-mrs/run-on-arch-action@master
name: Build artifact
id: build
with:
arch: aarch64
distro: noetic
githubToken: ${{ github.token }}
# Create an artifacts directory
setup: |
mkdir -p "/tmp/artifacts"
mkdir -p "/tmp/repository"
# Mount the artifacts directory as /artifacts in the container
dockerRunArgs: |
--volume "$PWD:/tmp/repository"
--volume "/tmp/artifacts:/tmp/artifacts"
# The shell to run commands with in the container
shell: /bin/sh
install: |
apt-get update -q -y
apt-get upgrade -q -y
# Produce a binary artifact and place it in the mounted volume
run: |
git config --global --add safe.directory "*"
/tmp/repository/.ci_scripts/package_build/build_package.sh /tmp/repository /tmp/artifacts