forked from AimRT/AimRT
-
Notifications
You must be signed in to change notification settings - Fork 0
68 lines (58 loc) · 1.6 KB
/
build-workflow.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
name: build Workflow
on:
workflow_call:
inputs:
image_name:
required: true
type: string
default: ubuntu
image_tag:
required: false
type: string
default: latest
run_platform:
required: false
type: string
default: amd64
secrets:
TEST_CMD:
required: true
jobs:
build:
runs-on: ${{ inputs.run_platform }}
container:
image: ${{ inputs.image_name }}:${{ inputs.image_tag }}
steps:
- name: Checkout code
uses: actions/checkout@v4
env:
https_proxy: ${{ secrets.https_proxy }}
http_proxy: ${{ secrets.http_proxy }}
with:
ref: ${{ github.event.pull_request.head.sha }}
- name: Run build stage
env:
https_proxy: ""
http_proxy: ""
no_proxy: "*"
shell: bash
run: |
if [ -d "./build" ]; then
ls -lah ./build
fi
echo "removing CMakeCache.txt"
rm -rf ./build/CMakeCache.txt
source /opt/ros/humble/setup.bash
eval "${{ secrets.BUILD_CMD}}"
echo "ls -lah ${{vars.PROJECT_ARTIFACTS_DIR}}"
ls -lah ${{vars.PROJECT_ARTIFACTS_DIR}}
echo "ls -lah ${{vars.WHL_ARTIFACTS_DIR}}"
ls -lah ${{vars.WHL_ARTIFACTS_DIR}}
- name: upload build artifact
if: github.action
uses: actions/upload-artifact@v3
with:
name: build_artifact
path: |
${{vars.WHL_ARTIFACTS_DIR}}
retention-days: 3