Pre-release 0.11.1 #215
Workflow file for this run
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
name: gen_pack | |
on: | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: [main] | |
release: | |
types: [published] | |
jobs: | |
lint: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Install Ubuntu deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
shellcheck | |
- uses: ammaraskar/gcc-problem-matcher@master | |
- name: Run ShellCheck | |
run: | | |
shellcheck -s bash -f gcc gen-pack lib/* | |
cov: | |
runs-on: ubuntu-latest | |
timeout-minutes: 5 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
submodules: recursive | |
- name: Install Ubuntu deps | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
dos2unix \ | |
kcov | |
- name: Run kcov | |
run: | | |
./test/run_cov.sh | |
- name: Upload Report to Codecov | |
uses: Wandalen/wretry.action@master | |
with: | |
action: codecov/codecov-action@v4 | |
with: | | |
token: ${{ secrets.CODECOV_TOKEN }} | |
files: test/cov/all/kcov-merged/cov.xml | |
name: Unittests | |
fail_ci_if_error: true | |
attempt_limit: 3 | |
attempt_delay: 5000 | |
- name: Publish code coverage to CodeClimate | |
uses: paambaati/[email protected] | |
env: | |
CC_TEST_REPORTER_ID: 014aa60d63fc69bc3b476cf84ce1fa07d0067d537da95a367d1fedddb5022c2b | |
with: | |
coverageLocations: | | |
${{github.workspace}}/test/cov/all/kcov-merged/cov.xml:cobertura | |
prefix: ${{github.workspace}}// | |
debug: true | |
tests: | |
runs-on: ${{ matrix.os }} | |
timeout-minutes: 5 | |
strategy: | |
fail-fast: true | |
matrix: | |
os: [ macos-13, macos-14, ubuntu-20.04, ubuntu-22.04, windows-2022 ] | |
include: | |
- os: macos-13 | |
target: darwin-amd64 | |
archiveext: tar.gz | |
unarcmd: tar -xzf | |
- os: macos-14 | |
target: darwin-arm64 | |
archiveext: tar.gz | |
unarcmd: tar -xzf | |
- os: ubuntu-20.04 | |
target: linux-amd64 | |
archiveext: tar.gz | |
unarcmd: tar -xzf | |
- os: ubuntu-22.04 | |
target: linux-amd64 | |
archiveext: tar.gz | |
unarcmd: tar -xzf | |
- os: windows-2022 | |
target: windows-amd64 | |
archiveext: zip | |
unarcmd: 7z x | |
env: | |
CMSIS_PACK_ROOT: ${{ github.workspace }}/.packs/ | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
submodules: recursive | |
- name: Install Ubuntu deps | |
if: ${{ startsWith(matrix.os, 'ubuntu') }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install \ | |
dos2unix \ | |
libxml2-utils | |
- name: Install MacOS deps | |
if: ${{ startsWith(matrix.os, 'macos') }} | |
run: | | |
brew install \ | |
bash \ | |
coreutils \ | |
dos2unix \ | |
gnu-tar \ | |
grep | |
- name: Install CMSIS-Toolbox | |
shell: bash | |
run: | | |
curl -L https://github.com/Open-CMSIS-Pack/cmsis-toolbox/releases/download/2.3.0/cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }} -o cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }} | |
${{ matrix.unarcmd }} cmsis-toolbox-${{ matrix.target }}.${{ matrix.archiveext }} | |
echo "$(pwd)/cmsis-toolbox-${{ matrix.target }}/bin" >> $GITHUB_PATH | |
- name: Install pack ARM.CMSIS | |
shell: bash | |
run: | | |
cpackget init https://www.keil.com/pack/index.pidx | |
cpackget add ARM.CMSIS | |
- name: Run unit tests | |
shell: bash | |
env: | |
LANG: en_GB.UTF-8 | |
LC_ALL: en_GB.UTF-8 | |
TMPDIR: ${{ github.workspace }}/../../tmp | |
run: | | |
mkdir -p ${TMPDIR} | |
./test/run_all.sh |