Skip to content

Commit

Permalink
.github: update rules
Browse files Browse the repository at this point in the history
  • Loading branch information
khancyr authored and peterbarker committed Feb 4, 2023
1 parent 08f6c56 commit 5df7e4e
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 29 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/esp32_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
sudo apt install cmake
git submodule update --init --recursive
git submodule update --init --recursive --depth=1
./Tools/scripts/esp32_get_idf.sh
sudo ln -s /usr/bin/ninja /usr/bin/ninja-build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ concurrency:

jobs:
build:
runs-on: 'macos-latest'
runs-on: macos-latest
strategy:
fail-fast: false # don't cancel if a job from the matrix fails
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_chibios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
17 changes: 12 additions & 5 deletions .github/workflows/test_coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
build:
runs-on: ubuntu-20.04
container:
image: ardupilot/ardupilot-dev-coverage:latest
image: ardupilot/ardupilot-dev-${{ matrix.type }}:latest
options: --privileged
strategy:
fail-fast: false # don't cancel if a job from the matrix fails
Expand All @@ -27,6 +27,15 @@ jobs:
coverage,
sitltest-can,
]
type: [
coverage,
]
include:
- config: sitltest-can
type: periph
exclude:
- config: sitltest-can
type: coverage
steps:
# git checkout the PR
- uses: actions/checkout@v3
Expand All @@ -50,10 +59,8 @@ jobs:
- name: Configure CAN
if: ${{ matrix.config == 'sitltest-can'}}
run: |
sudo dpkg --add-architecture i386
sudo apt update
sudo apt install -y gcc-multilib g++-multilib
sudo apt -y install can-utils iproute2 linux-modules-extra-$(uname -r)
sudo apt -y linux-modules-extra-$(uname -r)
sudo modprobe vcan
sudo ip link add dev vcan0 type vcan
sudo ip link set up vcan0
Expand All @@ -66,7 +73,7 @@ jobs:
PATH="/github/home/.local/bin:$PATH"
python -m pip install --progress-bar off --user mavproxy
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 .)
if [[ ${{ matrix.config }} == "coverage" ]]; then
Tools/scripts/run_coverage.py -f
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_linux_sbc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_replay.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test_sitl_copter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -96,7 +96,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -150,7 +150,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -190,7 +190,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_sitl_periph.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_sitl_plane.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_sitl_rover.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -92,7 +92,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_sitl_sub.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test_sitl_tracker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down Expand Up @@ -90,7 +90,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down
14 changes: 10 additions & 4 deletions .github/workflows/test_size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ concurrency:
jobs:
build:
runs-on: ubuntu-20.04
container: ardupilot/ardupilot-dev-chibios:latest
container: ardupilot/ardupilot-dev-${{ matrix.toolchain }}:latest
strategy:
fail-fast: false # don't cancel if a job from the matrix fails
matrix:
toolchain: [
base, # GCC
chibios,
]
config: [
Durandal,
Expand All @@ -25,6 +25,12 @@ jobs:
Hitec-Airspeed, # 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:
- uses: actions/checkout@v3
with:
Expand Down Expand Up @@ -149,7 +155,6 @@ jobs:
shell: bash
run: |
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
- name: Feature compare with ${{ github.event.pull_request.base.ref }}
Expand All @@ -168,7 +173,8 @@ jobs:
- name: elf_diff compare with ${{ github.event.pull_request.base.ref }}
shell: bash
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
BIN_PREFIX="arm-none-eabi-"
if [ "${{matrix.config}}" = "disco" ]; then
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ jobs:
id: ccache_cache_timestamp
run: |
NOW=$(date -u +"%F-%T")
echo "{timestamp}=${NOW}" >> $GITHUB_OUTPUT
echo "timestamp=${NOW}" >> $GITHUB_OUTPUT
- name: ccache cache files
uses: actions/cache@v3
with:
Expand Down

0 comments on commit 5df7e4e

Please sign in to comment.