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
+7 -6
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,19 +39,16 @@ 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
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"
make ${{ matrix.check }} make ${{ matrix.check }}
- name: Uploading Coverage to Codecov.io - name: Uploading Coverage to Codecov.io
@@ -15,19 +15,19 @@ concurrency:
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
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: main test - name: main test
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"
make tests TESTFILTER=EKF make tests TESTFILTER=EKF
- name: Check if there is a functional change - name: Check if there is a functional change
@@ -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: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with: with:
fetch-depth: 0 fetch-depth: 0
- name: main test - name: main test
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"
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
if: steps.diff-check.outputs.CHANGE_INDICATED == 'true'
uses: stefanzweifel/git-auto-commit-action@v4 uses: stefanzweifel/git-auto-commit-action@v4
with: with:
file_pattern: 'src/modules/ekf2/test/change_indication/*.csv' file_pattern: 'src/modules/ekf2/test/change_indication/*.csv'
commit_user_name: ${GIT_COMMITTER_NAME} commit_user_name: ${{ env.GIT_COMMITTER_NAME }}
commit_user_email: ${GIT_COMMITTER_EMAIL} commit_user_email: ${{ env.GIT_COMMITTER_EMAIL }}
commit_message: | commit_message: |
'[AUTO COMMIT] update change indication' [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
+12 -10
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 \
-v "${GITHUB_WORKSPACE}:/workspace" \
-w /workspace \
px4io/px4-dev-ros-melodic:2021-09-08 \
bash -c '
git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace
make px4_sitl_default make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh mavros_posix_test_mission.test mission:=${{matrix.config.mission}} vehicle:=${{matrix.config.vehicle}} ./test/rostest_px4_run.sh \
mavros_posix_test_mission.test \
mission:=MC_mission_box \
vehicle:=iris
'
+11 -12
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 \
-v "${GITHUB_WORKSPACE}:/workspace" \
-w /workspace \
px4io/px4-dev-ros-melodic:2021-09-08 \
bash -c '
git config --global --add safe.directory /workspace git config --global --add safe.directory /workspace
make px4_sitl_default make px4_sitl_default
make px4_sitl_default sitl_gazebo-classic make px4_sitl_default sitl_gazebo-classic
./test/rostest_px4_run.sh ${{matrix.config.test_file}} vehicle:=${{matrix.config.vehicle}} ./test/rostest_px4_run.sh \
mavros_posix_tests_offboard_posctl.test \
vehicle:=iris
'
+11 -10
View File
@@ -19,11 +19,14 @@ 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
@@ -31,15 +34,13 @@ jobs:
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