CI: replace all usage of addnab/docker-run-action

It's unmaintained and the docker version it uses is not supported anymore.
This commit is contained in:
Matthias Grob
2026-02-13 10:30:06 +01:00
committed by Ramon Roche
parent 857b48d57d
commit fd68d5d043
6 changed files with 107 additions and 97 deletions
+9 -8
View File
@@ -19,6 +19,10 @@ concurrency:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
strategy: strategy:
fail-fast: false fail-fast: false
matrix: matrix:
@@ -35,20 +39,17 @@ jobs:
"px4_sitl_allyes", "px4_sitl_allyes",
"module_documentation", "module_documentation",
] ]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Building [${{ matrix.check }}] - name: Building [${{ matrix.check }}]
uses: addnab/docker-run-action@v3 run: |
with: cd "$GITHUB_WORKSPACE"
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556 git config --global --add safe.directory "$GITHUB_WORKSPACE"
options: -v ${{ github.workspace }}:/workspace make ${{ matrix.check }}
run: |
cd /workspace
git config --global --add safe.directory /workspace
make ${{ matrix.check }}
- name: Uploading Coverage to Codecov.io - name: Uploading Coverage to Codecov.io
if: contains(matrix.check, 'coverage') if: contains(matrix.check, 'coverage')
@@ -15,21 +15,21 @@ concurrency:
jobs: jobs:
unit_tests: unit_tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: main test container:
uses: addnab/docker-run-action@v3 image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556 steps:
options: -v ${{ github.workspace }}:/workspace - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: main test
run: | run: |
cd /workspace cd "$GITHUB_WORKSPACE"
git config --global --add safe.directory /workspace git config --global --add safe.directory "$GITHUB_WORKSPACE"
make tests TESTFILTER=EKF make tests TESTFILTER=EKF
- name: Check if there is a functional change - name: Check if there is a functional change
run: git diff --exit-code run: git diff --exit-code
working-directory: src/modules/ekf2/test/change_indication working-directory: src/modules/ekf2/test/change_indication
@@ -8,40 +8,47 @@ on:
jobs: jobs:
unit_tests: unit_tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
env: env:
GIT_COMMITTER_EMAIL: bot@px4.io GIT_COMMITTER_EMAIL: bot@px4.io
GIT_COMMITTER_NAME: PX4BuildBot GIT_COMMITTER_NAME: PX4BuildBot
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: main test steps:
uses: addnab/docker-run-action@v3 - uses: actions/checkout@v4
with: with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556 fetch-depth: 0
options: -v ${{ github.workspace }}:/workspace
- name: main test
run: | run: |
cd /workspace cd "$GITHUB_WORKSPACE"
git config --global --add safe.directory /workspace git config --global --add safe.directory "$GITHUB_WORKSPACE"
make tests TESTFILTER=EKF make tests TESTFILTER=EKF
- name: Check if there exists diff and save result in variable - name: Check if there exists diff and save result in variable
id: diff-check id: diff-check
run: echo "CHANGE_INDICATED=$(git diff --exit-code --output=/dev/null || echo $?)" >> $GITHUB_OUTPUT working-directory: src/modules/ekf2/test/change_indication
working-directory: src/modules/ekf2/test/change_indication run: |
if git diff --quiet; then
echo "CHANGE_INDICATED=false" >> $GITHUB_OUTPUT
else
echo "CHANGE_INDICATED=true" >> $GITHUB_OUTPUT
fi
- name: auto-commit any changes to change indication - name: auto-commit any changes to change indication
uses: stefanzweifel/git-auto-commit-action@v4 if: steps.diff-check.outputs.CHANGE_INDICATED == 'true'
with: uses: stefanzweifel/git-auto-commit-action@v4
file_pattern: 'src/modules/ekf2/test/change_indication/*.csv' with:
commit_user_name: ${GIT_COMMITTER_NAME} file_pattern: 'src/modules/ekf2/test/change_indication/*.csv'
commit_user_email: ${GIT_COMMITTER_EMAIL} commit_user_name: ${{ env.GIT_COMMITTER_NAME }}
commit_message: | commit_user_email: ${{ env.GIT_COMMITTER_EMAIL }}
'[AUTO COMMIT] update change indication' commit_message: |
[AUTO COMMIT] update change indication
See .github/workflopws/ekf_update_change_indicator.yml for more details See .github/workflows/ekf_update_change_indicator.yml for more details
- name: if there is a functional change, fail check - name: if there is a functional change, fail check
if: ${{ steps.diff-check.outputs.CHANGE_INDICATED }} if: steps.diff-check.outputs.CHANGE_INDICATED == 'true'
run: exit 1 run: exit 1
+18 -16
View File
@@ -19,25 +19,27 @@ concurrency:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:
fail-fast: false fail-fast: false
matrix:
config:
- {vehicle: "iris", mission: "MC_mission_box"}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Build SITL and Run Tests - name: Build SITL and Run Tests (inside old ROS container)
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: -v ${{ github.workspace }}:/workspace
run: | run: |
cd /workspace docker run --rm \
git config --global --add safe.directory /workspace -v "${GITHUB_WORKSPACE}:/workspace" \
make px4_sitl_default -w /workspace \
make px4_sitl_default sitl_gazebo-classic px4io/px4-dev-ros-melodic:2021-09-08 \
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} bash -c '
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh \
mavros_posix_test_mission.test \
mission:=MC_mission_box \
vehicle:=iris
'
+17 -18
View File
@@ -19,27 +19,26 @@ concurrency:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
ACTIONS_ALLOW_USE_UNSECURE_NODE_VERSION: true
strategy: strategy:
fail-fast: false fail-fast: false
matrix:
config:
- {test_file: "mavros_posix_tests_offboard_posctl.test", vehicle: "iris"}
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Build PX4 and Run Tests - name: Build SITL and Run Tests (inside old ROS container)
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev-ros-melodic:2021-09-08
options: -v ${{ github.workspace }}:/workspace
run: | run: |
cd /workspace docker run --rm \
git config --global --add safe.directory /workspace -v "${GITHUB_WORKSPACE}:/workspace" \
make px4_sitl_default -w /workspace \
make px4_sitl_default sitl_gazebo-classic px4io/px4-dev-ros-melodic:2021-09-08 \
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}} bash -c '
git config --global --add safe.directory /workspace
make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh \
mavros_posix_tests_offboard_posctl.test \
vehicle:=iris
'
+15 -14
View File
@@ -19,27 +19,28 @@ concurrency:
jobs: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
container:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
strategy: strategy:
matrix: matrix:
config: [ config:
px4_fmu-v5_default, - px4_fmu-v5_default
]
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: Build PX4 and Run Test [${{ matrix.config }}] - name: Build PX4 and Run Test [${{ matrix.config }}]
uses: addnab/docker-run-action@v3
with:
image: px4io/px4-dev:v1.16.0-rc1-258-g0369abd556
options: -v ${{ github.workspace }}:/workspace
run: | run: |
cd /workspace cd "$GITHUB_WORKSPACE"
git config --global --add safe.directory /workspace git config --global --add safe.directory "$GITHUB_WORKSPACE"
export PX4_EXTRA_NUTTX_CONFIG="CONFIG_NSH_LOGIN_PASSWORD=\"test\";CONFIG_NSH_CONSOLE_LOGIN=y" export PX4_EXTRA_NUTTX_CONFIG='CONFIG_NSH_LOGIN_PASSWORD="test";CONFIG_NSH_CONSOLE_LOGIN=y'
echo "PX4_EXTRA_NUTTX_CONFIG: $PX4_EXTRA_NUTTX_CONFIG" echo "PX4_EXTRA_NUTTX_CONFIG: $PX4_EXTRA_NUTTX_CONFIG"
make ${{ matrix.config }} nuttx_context make ${{ matrix.config }} nuttx_context
echo "Check that the config option is set" echo "Check that the config option is set"
grep CONFIG_NSH_LOGIN_PASSWORD build/${{ matrix.config }}/NuttX/nuttx/.config grep CONFIG_NSH_LOGIN_PASSWORD build/${{ matrix.config }}/NuttX/nuttx/.config