Skip to content

Pack reqs (#679)

Pack reqs (#679) #468

Workflow file for this run

name: test_libs
on:
workflow_call:
push:
branches:
- main
paths:
- '.github/workflows/test_libs.yml'
- '.github/matrix_includes_test_libs.json'
- 'libs/**'
- '!**/docs/**/*'
- '!**/*.md'
pull_request:
paths:
- '.github/workflows/test_libs.yml'
- '.github/matrix_includes_test_libs.json'
- 'libs/**'
- '!**/docs/**/*'
- '!**/*.md'
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
setup:
uses: Open-CMSIS-Pack/devtools/.github/workflows/shared_setup_env.yml@main
with:
run_if: ${{ ((github.event.schedule != '') && github.event.repository.private) == false }}
matrix_prep:
needs: setup
uses: Open-CMSIS-Pack/devtools/.github/workflows/shared_matrix_prep.yml@main
with:
workflow_name: test_libs
test_libs:
runs-on: ${{ matrix.runs_on }}
needs: [ setup, matrix_prep ]
timeout-minutes: 15
strategy:
fail-fast: false
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }}
steps:
- name: Checkout devtools
uses: actions/checkout@v3
with:
submodules: true
# https://github.com/Open-CMSIS-Pack/devtools-build-action
- name: Build all libs
uses: Open-CMSIS-Pack/devtools-build-action@arm64
id: devtools-build
with:
add_cmake_variables: '-DLIBS_ONLY=ON'
arch: ${{ matrix.arch }}
target: all
- name: Install macos deps
if: ${{ startsWith(matrix.runs_on, 'macos') }}
run: |
brew install \
dos2unix \
wget
- name: Install linux deps
if: ${{ startsWith(matrix.runs_on, 'ubuntu') }}
run: |
sudo apt-get update
sudo apt-get install \
dos2unix \
libxml2-utils
# CrossPlatformUnitTests failing for arm64
- name: Run libs unittest
if: matrix.arch != 'arm64'
run: |
ctest -C Debug -V
working-directory: ./build
- name: Archive libs unittest reports
if: always() && (matrix.arch != 'arm64')
uses: actions/upload-artifact@v3
with:
name: unit_test_result-${{ matrix.target }}-${{ matrix.arch }}
path: ./build/test_reports/*${{ matrix.target }}-${{ matrix.arch }}.xml
retention-days: ${{ needs.setup.outputs.retention_days }}
if-no-files-found: error
test-results-preparation:
name: "Publish Tests Results"
needs: [ test_libs ]
runs-on: ubuntu-22.04
steps:
- name: Event File
uses: actions/upload-artifact@v3
with:
name: Event File
path: ${{ github.event_path }}