-
Notifications
You must be signed in to change notification settings - Fork 1
153 lines (127 loc) · 4.64 KB
/
integration.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
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
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
# Checks for merging PR, includes linting
name: Integration pipeline
run-name: Integration pipeline triggered by ${{ github.actor }}
on:
pull_request:
workflow_dispatch:
inputs:
delivery:
description: 'Would you like to update the official image?'
required: false
default: true
type: boolean
deployment:
description: 'Would you like to run unit and benchmarking tests?'
required: false
default: true
type: boolean
jobs:
integration:
runs-on: self-hosted
permissions:
checks: write
pull-requests: write
id: integration
steps:
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "The name of your branch is ${{ github.head_ref }} and your repository is ${{ github.repository }}."
- name: Checkout branch
uses: actions/checkout@v4
with:
ref: ${{ github.head_ref }}
- name: Print branch
run: |
echo "Checked out branch: ${{ github.head_ref }}"
- name: Show directory contents
run: |
echo "Current directory: $(pwd)"
echo "Directory contents:"
ls -la
- name: List files in the repository
run: |
echo "github workspace folder"
ls ${{ github.workspace }}
- name: Check current directory
run: pwd
- name: List files in current directory
run: ls -la
- name: List root directory
run: ls -la /
- name: List runner's work directory
run: ls -la /home/runner/work
- name: List runner's temp directory
run: ls -la /home/runner/_temp
- name: List runner's tool directory
run: ls -la /home/runner/_tool
- name: List GitHub workspace directory
run: ls -la ${{ github.workspace }}
- name: Show environment variables
run: env
# - name: C++ lint
# uses: cpp-linter/cpp-linter-action@v2
# id: cpp_linter
# with:
# style: "file"
# tidy-checks: ""
# thread-comments: ${{ github.event_name == 'pull_request' && 'update' }}
# - name: Lint with pylint
# run: |
# pylint --disable=C0301 --disable=C0326 *.py
# if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
# - name: Lint with flake8
# run: |
# # stop the build if there are Python syntax errors or undefined names
# flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# # exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
# flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
# - name: Check for linting errors
# id: lint-check
# run: |
# if [ -f lint-results.txt ]; then
# echo "Linting issues found"
# cat lint-results.txt
# exit 1
# else
# echo "No linting issues found"
# fi
# - name: Compile
# run: |
# cd /ros_ws
# rosdep install --from-paths src -y --ignore-src
# colcon build --packages-select custom_interface
# colcon build --packages-select node_test
# . install/setup.bash
# - name: Test run
# run: |
# ros2 run node_test jetson_node
- name: Update pull request
run: |
git config user.name "github-actions"
git config user.email "[email protected]"
if [[ $(git status --porcelain) ]]; then
git add .
git commit -m "Auto-fix lint issues"
git push origin HEAD:${{ github.head_ref }}
else
echo "No lint fixes applied, nothing to commit."
fi
- run: echo ${{ github.event.inputs.delivery }}
- run: echo ${{ inputs.delivery }}
- run: echo ${{ github.event.inputs.deployment }}
- run: echo ${{ inputs.deployment }}
# These are only triggered through workflow dispatch
delivery:
if: ${{ github.event.inputs.delivery }}
run: echo "this was detected successfully as a boolean (delivery)"
# uses: ./.github/workflows/delivery.yml
# with:
# branch: {{ github.head_ref }}
# deployment: {{ github.events.inputs.deployment }}
deployment:
if: ${{ inputs.deployment }}
run: echo "this was detected successfully as boolean (deployment)"
# needs: delivery
# uses: ./.github/workflows/deployment.yml
# with:
# container_branch: {{ github.head_ref }}
# container_version: {{ needs.delivery.outputs.version }}