forked from mavlink/mavlink
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
CI improvements, add deploy to c_library_v1/2 back in (mavlink#1568)
* workflows: remove Python 3.5 which is EOL I'll leave Python 2.7 so that we don't accidentally break it. * scripts: separate tests into functions This way we can run parts of it in respective CI instances. * workflows: separate test into format, python, node This way we don't have an explosion of versions to test. * scripts: use consistent shebang * workflows: use newer action * workflows: ignore node 15 for now * workflows: add fake deploy step * workflows/scripts: update deploy script
- Loading branch information
Showing
6 changed files
with
164 additions
and
103 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,98 @@ | ||
name: Test and deploy | ||
|
||
on: | ||
push: | ||
branches: | ||
- 'master' | ||
pull_request: | ||
branches: | ||
- '*' | ||
|
||
# paths: | ||
# - "*" | ||
# - "!README.md" <-- don't rebuild on doc change | ||
|
||
jobs: | ||
format: | ||
name: Formatting check | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- run: | | ||
sudo apt update | ||
sudo apt install -y libxml2-dev libxml2-utils | ||
- name: Check formatting | ||
run: | | ||
./scripts/test.sh format | ||
python-tests: | ||
name: Python ${{ matrix.python-version }} tests | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: [2.7, 3.6, 3.7, 3.8] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
- name: Install dependencies | ||
run: | | ||
pip install future lxml | ||
- name : Test Python generator | ||
run: | | ||
./scripts/test.sh py | ||
node-tests: | ||
name: Node ${{ matrix.node-version }} test | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
node-version: ['12', '14'] # 15 fails for some weird reason | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
pip install future lxml | ||
- uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
- run: npm install | ||
- name : Test mavlink | ||
run: | | ||
./scripts/test.sh node | ||
deploy: | ||
name: Generate and push C headers | ||
needs: [format, python-tests, node-tests] | ||
runs-on: ubuntu-20.04 | ||
if: github.ref == 'refs/heads/master' | ||
env: | ||
GH_TOKEN: ${{ secrets.GH_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: 'recursive' | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Install dependencies | ||
run: | | ||
pip install future lxml | ||
- name: Run deploy script | ||
run: | | ||
./scripts/update_generated_repos.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
set -e | ||
|
||
# A POSIX variable | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#!/bin/bash | ||
#!/usr/bin/env bash | ||
|
||
# c_library repository update script | ||
# Author: Thomas Gubler <[email protected]> | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters