.github: update rules

This commit is contained in:
Pierre Kancir 2023-02-03 09:59:53 +01:00 committed by Peter Barker
parent 08f6c56276
commit 5df7e4e32b
14 changed files with 42 additions and 29 deletions

View File

@ -38,7 +38,7 @@ jobs:
sudo apt install cmake sudo apt install cmake
git submodule update --init --recursive git submodule update --init --recursive --depth=1
./Tools/scripts/esp32_get_idf.sh ./Tools/scripts/esp32_get_idf.sh
sudo ln -s /usr/bin/ninja /usr/bin/ninja-build sudo ln -s /usr/bin/ninja /usr/bin/ninja-build

View File

@ -7,7 +7,7 @@ concurrency:
jobs: jobs:
build: build:
runs-on: 'macos-latest' runs-on: macos-latest
strategy: strategy:
fail-fast: false # don't cancel if a job from the matrix fails fail-fast: false # don't cancel if a job from the matrix fails
matrix: matrix:

View File

@ -70,7 +70,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -15,7 +15,7 @@ jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: container:
image: ardupilot/ardupilot-dev-coverage:latest image: ardupilot/ardupilot-dev-${{ matrix.type }}:latest
options: --privileged options: --privileged
strategy: strategy:
fail-fast: false # don't cancel if a job from the matrix fails fail-fast: false # don't cancel if a job from the matrix fails
@ -27,6 +27,15 @@ jobs:
coverage, coverage,
sitltest-can, sitltest-can,
] ]
type: [
coverage,
]
include:
- config: sitltest-can
type: periph
exclude:
- config: sitltest-can
type: coverage
steps: steps:
# git checkout the PR # git checkout the PR
- uses: actions/checkout@v3 - uses: actions/checkout@v3
@ -50,10 +59,8 @@ jobs:
- name: Configure CAN - name: Configure CAN
if: ${{ matrix.config == 'sitltest-can'}} if: ${{ matrix.config == 'sitltest-can'}}
run: | run: |
sudo dpkg --add-architecture i386
sudo apt update sudo apt update
sudo apt install -y gcc-multilib g++-multilib sudo apt -y linux-modules-extra-$(uname -r)
sudo apt -y install can-utils iproute2 linux-modules-extra-$(uname -r)
sudo modprobe vcan sudo modprobe vcan
sudo ip link add dev vcan0 type vcan sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0 sudo ip link set up vcan0
@ -66,7 +73,7 @@ jobs:
PATH="/github/home/.local/bin:$PATH" PATH="/github/home/.local/bin:$PATH"
python -m pip install --progress-bar off --user mavproxy python -m pip install --progress-bar off --user mavproxy
python -m pip uninstall -y pymavlink python -m pip uninstall -y pymavlink
git submodule update --init --recursive git submodule update --init --recursive --depth=1
(cd modules/mavlink/pymavlink && DISABLE_MAVNATIVE=True MDEF="$PWD/../message_definitions" python -m pip install --progress-bar off --user .) (cd modules/mavlink/pymavlink && DISABLE_MAVNATIVE=True MDEF="$PWD/../message_definitions" python -m pip install --progress-bar off --user .)
if [[ ${{ matrix.config }} == "coverage" ]]; then if [[ ${{ matrix.config }} == "coverage" ]]; then
Tools/scripts/run_coverage.py -f Tools/scripts/run_coverage.py -f

View File

@ -51,7 +51,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -50,7 +50,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -96,7 +96,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -150,7 +150,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -190,7 +190,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -39,7 +39,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -92,7 +92,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -91,7 +91,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -92,7 +92,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -90,7 +90,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:
@ -90,7 +90,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with:

View File

@ -11,12 +11,12 @@ concurrency:
jobs: jobs:
build: build:
runs-on: ubuntu-20.04 runs-on: ubuntu-20.04
container: ardupilot/ardupilot-dev-chibios:latest container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest
strategy: strategy:
fail-fast: false # don't cancel if a job from the matrix fails fail-fast: false # don't cancel if a job from the matrix fails
matrix: matrix:
toolchain: [ toolchain: [
base, # GCC chibios,
] ]
config: [ config: [
Durandal, Durandal,
@ -25,6 +25,12 @@ jobs:
Hitec-Airspeed, # see special code for Periph below (3 places!) Hitec-Airspeed, # see special code for Periph below (3 places!)
f103-GPS # see special code for Periph below (3 places!) f103-GPS # see special code for Periph below (3 places!)
] ]
include:
- config: disco
toolchain: armhf
exclude:
- config: disco
toolchain: chibios
steps: steps:
- uses: actions/checkout@v3 - uses: actions/checkout@v3
with: with:
@ -149,7 +155,6 @@ jobs:
shell: bash shell: bash
run: | run: |
cd pr/ cd pr/
python3 -m pip install -U tabulate
Tools/scripts/pretty_diff_size.py -m $GITHUB_WORKSPACE/base_branch_bin -s $GITHUB_WORKSPACE/pr_bin Tools/scripts/pretty_diff_size.py -m $GITHUB_WORKSPACE/base_branch_bin -s $GITHUB_WORKSPACE/pr_bin
- name: Feature compare with ${{ github.event.pull_request.base.ref }} - name: Feature compare with ${{ github.event.pull_request.base.ref }}
@ -168,7 +173,8 @@ jobs:
- name: elf_diff compare with ${{ github.event.pull_request.base.ref }} - name: elf_diff compare with ${{ github.event.pull_request.base.ref }}
shell: bash shell: bash
run: | run: |
python3 -m pip install -U weasyprint elf_diff anytree # we don't use weasyprint so manually pull the elf_diff deps reduce install size and time
python3 -m pip install -U --no-deps elf_diff GitPython Jinja2 MarkupSafe PyYAML anytree dict2xml gitdb progressbar2 python-utils setuptools-git smmap
mkdir elf_diff mkdir elf_diff
BIN_PREFIX="arm-none-eabi-" BIN_PREFIX="arm-none-eabi-"
if [ "${{matrix.config}}" = "disco" ]; then if [ "${{matrix.config}}" = "disco" ]; then

View File

@ -37,7 +37,7 @@ jobs:
id: ccache_cache_timestamp id: ccache_cache_timestamp
run: | run: |
NOW=$(date -u +"%F-%T") NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files - name: ccache cache files
uses: actions/cache@v3 uses: actions/cache@v3
with: with: