CMSIS-Toolbox Version 2.7.0 #396
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: toolbox | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- '.github/workflows/toolbox.yml' | |
- '.github/matrix_release_includes.json' | |
- 'debian/**' | |
- 'test/test.py' | |
- 'scripts/**' | |
- '!docs/**' | |
- '!**/*.md' | |
pull_request: | |
paths: | |
- '.github/workflows/toolbox.yml' | |
- '.github/matrix_release_includes.json' | |
- 'test/test.py' | |
- 'scripts/**' | |
- '!docs/**' | |
- '!**/*.md' | |
release: | |
types: [published] | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
matrix_prep: | |
runs-on: ubuntu-latest | |
outputs: | |
matrix: ${{ steps.set-matrix.outputs.matrix }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
- uses: JoshuaTheMiller/conditional-build-matrix@81b51eb8d89e07b86404934b5fecde1cea1163a5 # v2.0.1 | |
id: set-matrix | |
with: | |
inputFile: '.github/matrix_release_includes.json' | |
filter: '[?runOnBranch==`always`]' | |
create_archives: | |
if: | | |
${{ github.event_name == 'pull_request' || github.event_name == 'release' }} | |
timeout-minutes: 15 | |
needs: [ matrix_prep ] | |
runs-on: ${{ matrix.runs_on }} | |
strategy: | |
matrix: ${{ fromJson(needs.matrix_prep.outputs.matrix) }} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout cmsis-toolbox repository | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
fetch-depth: 0 | |
- name: Create folders | |
run: | | |
mkdir -p toolbox | |
- name: Download buildmgr release asset | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/devtools" | |
version: tags/tools/buildmgr/2.7.0 | |
file: cbuild_install.sh | |
target: toolbox/cbuild_install.sh | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download projmgr release asset | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/devtools" | |
version: tags/tools/projmgr/2.7.0 | |
file: projmgr.zip | |
target: toolbox/projmgr.zip | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download cbridge release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/generator-bridge" | |
version: tags/v0.9.14 | |
regex: true | |
file: "cbridge_.*\\.(zip|gz)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download cbuild release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/cbuild" | |
version: tags/v2.7.0 | |
regex: true | |
file: "cbuild_.*\\.(zip|gz)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download cbuild2cmake release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/cbuild2cmake" | |
version: tags/v0.9.5 | |
regex: true | |
file: "cbuild2cmake_.*\\.(zip|gz)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download cpackget release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/cpackget" | |
version: tags/v2.1.5 | |
regex: true | |
file: "cpackget_.*\\.(zip|gz)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download packchk release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/devtools" | |
version: tags/tools/packchk/1.4.1 | |
regex: true | |
file: "packchk-.*\\.(zip|tbz2)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download svdconv release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/devtools" | |
version: tags/tools/svdconv/3.3.47 | |
regex: true | |
file: "svdconv-.*\\.(zip|tbz2)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Download vidx2pidx release assets | |
uses: dsaltares/fetch-gh-release-asset@aa2ab1243d6e0d5b405b973c89fa4d06a2d0fff7 # master | |
with: | |
repo: "Open-CMSIS-Pack/vidx2pidx" | |
version: tags/v0.0.4 | |
regex: true | |
file: "vidx2pidx_.*\\.(zip|gz)" | |
target: "toolbox/" | |
token: ${{ secrets.GITHUB_TOKEN }} | |
- name: Create Directories | |
shell: bash | |
run: | | |
mkdir -p buildmgr | |
mkdir -p projmgr | |
mkdir -p cbridge | |
mkdir -p cbuild | |
mkdir -p cbuild2cmake | |
mkdir -p cpackget | |
mkdir -p packchk | |
mkdir -p svdconv | |
mkdir -p vidx2pidx | |
mkdir -p distribution/bin | |
mkdir -p distribution/etc | |
mkdir -p distribution/doc | |
working-directory: toolbox | |
- name: Unzip files Windows | |
if: ${{ matrix.target == 'windows'}} | |
shell: bash | |
run: | | |
unzip cbridge_\*_${{ matrix.target }}_${{ matrix.arch }}.zip -d cbridge | |
unzip cbuild_\*_${{ matrix.target }}_${{ matrix.arch }}.zip -d cbuild | |
unzip cbuild2cmake_\*_${{ matrix.target }}_${{ matrix.arch }}.zip -d cbuild2cmake | |
unzip cpackget_\*_${{ matrix.target }}_${{ matrix.arch }}.zip -d cpackget | |
unzip packchk\*-${{ matrix.target }}-${{ matrix.arch }}.zip -d packchk | |
unzip svdconv-\*-${{ matrix.target }}-${{ matrix.arch }}.zip -d svdconv | |
unzip vidx2pidx_\*_${{ matrix.target }}_${{ matrix.arch }}.zip -d vidx2pidx | |
unzip projmgr.zip -d projmgr | |
./cbuild_install.sh -x buildmgr | |
working-directory: toolbox | |
- name: Unzip files Linux Darwin | |
if: ${{ matrix.target == 'linux' || matrix.target == 'darwin'}} | |
shell: bash | |
run: | | |
tar -xvf cbridge_*_${{ matrix.target }}_${{ matrix.arch }}.tar.gz -C cbridge | |
tar -xvf cbuild_*_${{ matrix.target }}_${{ matrix.arch }}.tar.gz -C cbuild | |
tar -xvf cbuild2cmake_*_${{ matrix.target }}_${{ matrix.arch }}.tar.gz -C cbuild2cmake | |
tar -xvf cpackget_*_${{ matrix.target }}_${{ matrix.arch }}.tar.gz -C cpackget | |
tar -xvf packchk-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C packchk | |
tar -xvf svdconv-*-${{ matrix.target }}-${{ matrix.arch }}.tbz2 -C svdconv | |
tar -xvf vidx2pidx_*_${{ matrix.target }}_${{ matrix.arch }}.tar.gz -C vidx2pidx | |
unzip projmgr.zip -d projmgr | |
sudo chmod +x ./cbuild_install.sh && ./cbuild_install.sh -x buildmgr | |
working-directory: toolbox | |
- name: Unzip files Windows & amd64 | |
if: ${{ matrix.target == 'windows' && matrix.arch == 'arm64' }} | |
shell: bash | |
run: | | |
unzip cbridge_\*_${{ matrix.target }}_amd64.zip -d cbridge_amd64 | |
unzip cbuild_\*_${{ matrix.target }}_amd64.zip -d cbuild_amd64 | |
unzip cbuild2cmake_\*_${{ matrix.target }}_amd64.zip -d cbuild2cmake_amd64 | |
unzip cpackget_\*_${{ matrix.target }}_amd64.zip -d cpackget_amd64 | |
unzip packchk\*-${{ matrix.target }}-amd64.zip -d packchk_amd64 | |
unzip svdconv-\*-${{ matrix.target }}-amd64.zip -d svdconv_amd64 | |
unzip vidx2pidx_\*_${{ matrix.target }}_amd64.zip -d vidx2pidx_amd64 | |
working-directory: toolbox | |
- name: Unzip files Linux Darwin & amd64 | |
if: ${{ (matrix.target == 'linux' || matrix.target == 'darwin') && matrix.arch == 'arm64'}} | |
shell: bash | |
run: | | |
mkdir -p projmgr_amd64 | |
mkdir -p cbridge_amd64 | |
mkdir -p cbuild_amd64 | |
mkdir -p cbuild2cmake_amd64 | |
mkdir -p cpackget_amd64 | |
mkdir -p packchk_amd64 | |
mkdir -p svdconv_amd64 | |
mkdir -p vidx2pidx_amd64 | |
tar -xvf cbridge_*_${{ matrix.target }}_amd64.tar.gz -C cbridge_amd64 | |
tar -xvf cbuild_*_${{ matrix.target }}_amd64.tar.gz -C cbuild_amd64 | |
tar -xvf cbuild2cmake_*_${{ matrix.target }}_amd64.tar.gz -C cbuild2cmake_amd64 | |
tar -xvf cpackget_*_${{ matrix.target }}_amd64.tar.gz -C cpackget_amd64 | |
tar -xvf packchk-*-${{ matrix.target }}-amd64.tbz2 -C packchk_amd64 | |
tar -xvf svdconv-*-${{ matrix.target }}-amd64.tbz2 -C svdconv_amd64 | |
tar -xvf vidx2pidx_*_${{ matrix.target }}_amd64.tar.gz -C vidx2pidx_amd64 | |
working-directory: toolbox | |
- name: Copy Files amd64 | |
if: ${{ matrix.arch == 'arm64'}} | |
shell: bash | |
run: | | |
mkdir -p cmsis-toolbox-${{ matrix.target }}-amd64/bin | |
cp ./buildmgr/bin/cbuildgen${{ matrix.temp_extension }}-amd64 ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/cbuildgen${{ matrix.binary_extension }} | |
cp ./projmgr/bin/${{ matrix.target }}-amd64/csolution${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/csolution${{ matrix.binary_extension }} | |
cp ./cbridge_amd64/*/cbridge${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/cbridge${{ matrix.binary_extension }} | |
cp ./cbuild_amd64/*/cbuild${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/cbuild${{ matrix.binary_extension }} | |
cp ./cbuild2cmake_amd64/*/cbuild2cmake${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/cbuild2cmake${{ matrix.binary_extension }} | |
cp ./cpackget_amd64/*/cpackget${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/cpackget${{ matrix.binary_extension }} | |
cp ./packchk_amd64/packchk${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/packchk${{ matrix.binary_extension }} | |
cp ./svdconv_amd64/svdconv${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/svdconv${{ matrix.binary_extension }} | |
cp ./vidx2pidx_amd64/*/vidx2pidx${{ matrix.binary_extension }} ./cmsis-toolbox-${{ matrix.target }}-amd64/bin/vidx2pidx${{ matrix.binary_extension }} | |
working-directory: toolbox | |
- name: Add execution permission to the binaries and set files ownership | |
if: ${{ (matrix.target == 'linux' || matrix.target == 'darwin') && matrix.arch == 'arm64'}} | |
run: | | |
sudo chmod -R +x bin/* | |
sudo chown -R root: * | |
working-directory: toolbox/cmsis-toolbox-${{ matrix.target }}-amd64 | |
- name: Copy Files | |
shell: bash | |
run: | | |
curl https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.44/schema/PACK.xsd --output distribution/etc/PACK.xsd | |
curl https://raw.githubusercontent.com/Open-CMSIS-Pack/Open-CMSIS-Pack-Spec/v1.7.44/schema/PackIndex.xsd --output distribution/etc/PackIndex.xsd | |
cp ./buildmgr/bin/cbuildgen${{ matrix.temp_extension }}-${{ matrix.arch }} ./distribution/bin/cbuildgen${{ matrix.binary_extension }} | |
cp -r ./buildmgr/etc/* ./distribution/etc | |
rm ./distribution/etc/setup | |
cp ./projmgr/bin/${{ matrix.target }}-${{ matrix.arch }}/csolution${{ matrix.binary_extension }} ./distribution/bin/csolution${{ matrix.binary_extension }} | |
cp -r ./projmgr/etc/* ./distribution/etc | |
cp ./cbridge/*/cbridge${{ matrix.binary_extension }} ./distribution/bin/cbridge${{ matrix.binary_extension }} | |
cp ./cbridge/*/launch-MCUXpressoConfigTools* ./distribution/bin/ | |
cp ./cbuild/*/cbuild${{ matrix.binary_extension }} ./distribution/bin/cbuild${{ matrix.binary_extension }} | |
cp ./cbuild2cmake/*/cbuild2cmake${{ matrix.binary_extension }} ./distribution/bin/cbuild2cmake${{ matrix.binary_extension }} | |
cp ./cpackget/*/cpackget${{ matrix.binary_extension }} ./distribution/bin/cpackget${{ matrix.binary_extension }} | |
cp ./packchk/packchk${{ matrix.binary_extension }} ./distribution/bin/packchk${{ matrix.binary_extension }} | |
cp ./svdconv/svdconv${{ matrix.binary_extension }} ./distribution/bin/svdconv${{ matrix.binary_extension }} | |
cp ./vidx2pidx/*/vidx2pidx${{ matrix.binary_extension }} ./distribution/bin/vidx2pidx${{ matrix.binary_extension }} | |
cp ../docs/LICENSE.txt ./distribution | |
cp ../docs/index.html ./distribution/doc | |
working-directory: toolbox | |
- name: Update toolchain config files | |
if: ${{ matrix.target == 'windows' }} | |
shell: bash | |
run: | | |
sed -i '/set(EXT/c\ set(EXT .exe)' ./distribution/etc/AC6.6.16.2.cmake | |
sed -i '/set(EXT/c\ set(EXT .exe)' ./distribution/etc/GCC.10.3.1.cmake | |
sed -i '/set(EXT/c\ set(EXT .exe)' ./distribution/etc/IAR.9.32.1.cmake | |
sed -i '/set(EXT/c\ set(EXT .exe)' ./distribution/etc/CLANG.17.0.1.cmake | |
working-directory: toolbox | |
- name: Create output folders | |
run: | | |
mkdir cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
cp -r distribution/* cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
working-directory: toolbox | |
- name: Add execution permission to the binaries and set files ownership | |
if: ${{ matrix.target == 'linux' || matrix.target == 'darwin'}} | |
run: | | |
sudo chmod -R +x bin/* | |
sudo chown -R root: * | |
working-directory: toolbox/cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: '3.11' | |
cache: 'pip' | |
- name: Install pip dependencies | |
run: | | |
pip install --upgrade pip | |
pip install pyyaml | |
- name: Generate manifest file | |
shell: bash | |
run: | | |
# Get the toolbox version | |
TOOLBOX_VERSION=$(git describe --tags || echo "untagged") | |
# Set binary extension (default to empty string if not set) | |
BINARY_EXTENSION=${{ matrix.binary_extension }} | |
[ -z "$BINARY_EXTENSION" ] && BINARY_EXTENSION="" | |
# Get absolute path to the toolbox directory | |
TOOLBOX_ABS_PATH=$(pwd)/toolbox/cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
# Get host machine configuration | |
HOST=${{ matrix.target }}-${{ matrix.arch }} | |
# Run the Python script to generate the manifest file | |
python ./scripts/generate_manifest.py \ | |
-d "$TOOLBOX_ABS_PATH" \ | |
-v "$TOOLBOX_VERSION" \ | |
-e "$BINARY_EXTENSION" \ | |
--host "$HOST" | |
- name: Zip folders Windows | |
if: ${{ matrix.target == 'windows'}} | |
run: | | |
Compress-Archive -Path cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} -Destination cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }}${{ matrix.archive_extension }} | |
working-directory: toolbox | |
- name: Zip folders Linux Darwin | |
if: ${{ matrix.target == 'linux' || matrix.target == 'darwin'}} | |
run: | | |
tar -czvf cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }}${{ matrix.archive_extension }} cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
working-directory: toolbox | |
- name: Archive binaries | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }} | |
path: ./toolbox/cmsis-toolbox-${{ matrix.target }}-${{ matrix.arch }}${{ matrix.archive_extension }} | |
retention-days: 1 | |
if-no-files-found: error | |
# Debian Package | |
- name: Update dependencies | |
if: ${{ matrix.target == 'linux' && matrix.arch == 'amd64' }} | |
run: | | |
sudo apt-get update | |
sudo apt-get install ninja-build | |
- name: Create Debian Package | |
if: ${{ matrix.target == 'linux' && matrix.arch == 'amd64' }} | |
run: | | |
mkdir -p ./debian/build | |
cmake -G Ninja -S ./debian -B ./debian/build -DTOOLBOX_ROOT=$(realpath ./toolbox/cmsis-toolbox-linux-amd64) -DTOOLBOX_VERSION=$(echo ${{ github.ref }} | cut -d'/' -f3) | |
cd ./debian/build | |
cpack -G DEB | |
- name: Archive Debian Package | |
if: ${{ matrix.target == 'linux' && matrix.arch == 'amd64' }} | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: cmsis-toolbox-debian-package | |
path: ./debian/build/cmsis-toolbox_*_amd64.deb | |
retention-days: 1 | |
if-no-files-found: error | |
tests: | |
if: | | |
${{ github.event_name == 'pull_request' || github.event_name == 'release' }} | |
needs: [ create_archives ] | |
timeout-minutes: 15 | |
runs-on: ${{ matrix.config.os }} | |
name: 'Test (${{ matrix.config.target }}, ${{ matrix.config.arch }})' | |
strategy: | |
fail-fast: true | |
matrix: | |
config: | |
- { os: macos-13, target: darwin, arch: amd64 } | |
- { os: macos-14, target: darwin, arch: arm64 } | |
- { os: windows-2019, target: windows, arch: amd64} | |
- { os: windows-2019, target: windows, arch: arm64} | |
- { os: ubuntu-20.04, target: linux, arch: amd64} | |
- { os: ubuntu-20.04, target: linux, arch: arm64} | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Checkout cmsis-toolbox | |
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | |
with: | |
submodules: recursive | |
- name: Download cmsis toolbox ${{ matrix.config.target }} ${{ matrix.config.arch }} | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-${{ matrix.config.target }}-${{ matrix.config.arch }} | |
path: archive | |
- name: Create directory | |
run: | | |
mkdir -p toolbox | |
- name: unzip cmsis-toolbox windows archive | |
if: ${{ startsWith(matrix.config.os, 'windows') }} | |
run: unzip archive/cmsis-toolbox-${{ matrix.config.target }}-${{ matrix.config.arch }}.zip -d toolbox | |
- name: unzip cmsis-toolbox macos/linux archive | |
if: ${{ startsWith(matrix.config.os, 'macos') || startsWith(matrix.config.os, 'ubuntu') }} | |
run: tar -xvf archive/cmsis-toolbox-${{ matrix.config.target }}-${{ matrix.config.arch }}.tar.gz -C toolbox | |
- name: Set up Python | |
uses: actions/setup-python@0b93645e9fea7318ecaed2b359559ac225c90a2b # v5.3.0 | |
with: | |
python-version: '3.10' | |
- name: Install dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install pytest | |
- name: Test with pytest | |
run: | | |
pytest --base-path=toolbox/cmsis-toolbox-${{ matrix.config.target }}-${{ matrix.config.arch }} test/tests.py -rA --junitxml=test-results-${{ matrix.config.target }}-${{ matrix.config.arch }}.xml | |
- name: Archive test report | |
uses: actions/upload-artifact@b4b15b8c7c6ac21ea08fcf65892d2ee8f75cf882 # v4.4.3 | |
with: | |
name: toolbox-test-${{ matrix.config.target }}-${{ matrix.config.arch }} | |
path: ./test-results-*.xml | |
retention-days: 1 | |
if-no-files-found: error | |
publish-test-results: | |
if: github.event_name != 'release' | |
name: "Publish Tests Results" | |
needs: [ tests ] | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
issues: read | |
checks: write | |
pull-requests: write | |
steps: | |
- name: Harden Runner | |
uses: step-security/harden-runner@0080882f6c36860b6ba35c610c98ce87d4e2f26f # v2.10.2 | |
with: | |
egress-policy: audit | |
- name: Download Artifacts | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
path: artifacts | |
- name: publish test results | |
uses: EnricoMi/publish-unit-test-result-action/linux@170bf24d20d201b842d7a52403b73ed297e6645b # v2.18.0 | |
with: | |
commit: ${{ github.event.workflow_run.head_sha }} | |
report_individual_runs: true | |
files: "artifacts/**/test-results-*.xml" | |
release: | |
if: ${{ github.event_name == 'release' }} | |
needs: [ tests ] | |
runs-on: ubuntu-20.04 | |
timeout-minutes: 15 | |
steps: | |
- name: Download cmsis toolbox windows amd64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-windows-amd64 | |
path: toolbox/zip | |
- name: Download cmsis toolbox windows arm64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-windows-arm64 | |
path: toolbox/zip | |
- name: Download cmsis toolbox linux amd64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-linux-amd64 | |
path: toolbox/zip | |
- name: Download cmsis toolbox linux arm64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-linux-arm64 | |
path: toolbox/zip | |
- name: Download cmsis toolbox darwin amd64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-darwin-amd64 | |
path: toolbox/zip | |
- name: Download cmsis toolbox darwin arm64 zip | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-darwin-arm64 | |
path: toolbox/zip | |
- name: Download test report windows-amd64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-windows-amd64 | |
path: testreports/ | |
- name: Download test report windows-arm64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-windows-arm64 | |
path: testreports/ | |
- name: Download unit test report linux-amd64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-linux-amd64 | |
path: testreports/ | |
- name: Download unit test report linux-arm64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-linux-arm64 | |
path: testreports/ | |
- name: Download unit test report darwin-amd64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-darwin-amd64 | |
path: testreports/ | |
- name: Download unit test report darwin-arm64 | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: toolbox-test-darwin-arm64 | |
path: testreports/ | |
- name: Zip test reports | |
run: zip -r testreports.zip * | |
working-directory: testreports | |
- name: Attach test report archive to release assets | |
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: testreports/testreports.zip | |
tag: ${{ github.ref }} | |
overwrite: true | |
asset_name: testreports.zip | |
- name: Calculate checksums | |
run: | | |
sha256sum cmsis-toolbox-windows-amd64.zip --text > cmsis-toolbox-checksums.txt | |
sha256sum cmsis-toolbox-windows-arm64.zip --text >> cmsis-toolbox-checksums.txt | |
sha256sum cmsis-toolbox-linux-amd64.tar.gz --text >> cmsis-toolbox-checksums.txt | |
sha256sum cmsis-toolbox-linux-arm64.tar.gz --text >> cmsis-toolbox-checksums.txt | |
sha256sum cmsis-toolbox-darwin-amd64.tar.gz --text >> cmsis-toolbox-checksums.txt | |
sha256sum cmsis-toolbox-darwin-arm64.tar.gz --text >> cmsis-toolbox-checksums.txt | |
working-directory: toolbox/zip | |
- name: Attach installer to release assets | |
id: release_assets | |
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: toolbox/zip/cmsis-toolbox-* | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true | |
# Debian Package | |
- name: Download Debian Package | |
uses: actions/download-artifact@fa0a91b85d4f404e444e00e005971372dc801d16 # v4.1.8 | |
with: | |
name: cmsis-toolbox-debian-package | |
path: debian | |
- name: Attach Debian Package to release assets | |
uses: svenstaro/upload-release-action@04733e069f2d7f7f0b4aebc4fbdbce8613b03ccd # v2 | |
with: | |
repo_token: ${{ secrets.GITHUB_TOKEN }} | |
file: debian/cmsis-toolbox_*_amd64.deb | |
tag: ${{ github.ref }} | |
overwrite: true | |
file_glob: true |