.github/.workflows/ports_psoc6.yml: Fixing cd to test path. #1028
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: psoc6 port | |
on: | |
push: | |
pull_request: | |
paths: | |
- '.github/workflows/*.yml' | |
- 'tools/**' | |
- 'py/**' | |
- 'extmod/**' | |
- 'shared/**' | |
- 'lib/**' | |
- 'drivers/**' | |
- 'ports/psoc6/**' | |
jobs: | |
server-build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
board: [CY8CPROTO-062-4343W] | |
outputs: | |
commit_sha: ${{ steps.commit_sha.outputs.sha_short }} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install packages | |
run: source tools/ci.sh && ci_psoc6_setup | |
- name: Build | |
run: source tools/ci.sh && ci_psoc6_build ${{ matrix.board }} | |
# Steps only relevant for Infineon fork | |
# with self-hosted runner available | |
- name: Gets commit SHA | |
if: success() && github.repository_owner == 'infineon' | |
id: commit_sha | |
run: echo "sha_short=$(git rev-parse --short HEAD)" >> $GITHUB_OUTPUT | |
- name: Save firmware bin | |
if: success() && github.repository_owner == 'infineon' | |
uses: actions/upload-artifact@v3 | |
with: | |
name: mpy-psoc6_${{ matrix.board }}_${{ steps.commit_sha.outputs.sha_short }} | |
path: ports/psoc6/build/firmware.hex | |
# Jobs only relevant for Infineon fork | |
on-target-test: | |
if: github.repository_owner == 'infineon' | |
runs-on: self-hosted | |
needs: server-build | |
strategy: | |
matrix: | |
board: [CY8CPROTO-062-4343W] | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download binaries | |
uses: actions/download-artifact@v3 | |
- name: Setup device | |
run: | | |
cd tools/psoc6 | |
cp ../../mpy-psoc6_${{ matrix.board }}_${{ needs.server-build.outputs.commit_sha }}/firmware.hex . | |
source mpy-psoc6.sh && openocd_download_install && openocd_board_conf_download ${{ matrix.board }} && mpy_firmware_deploy ${{ matrix.board }} firmware.hex | |
cd ../.. | |
- name: Run psoc6 tests | |
run: | | |
cd tests | |
./psoc6/run_psoc6_test.sh --psoc6 | |
- name: Run psoc6 multi test | |
run: | | |
cd test | |
./psoc6/run_psoc6_test.sh --psoc6-multi | |
- name: Run all implemented tests | |
# if: github.event_name == 'pull_request' | |
# continue-on-error: true | |
run: | | |
cd test | |
./psoc6/run_psoc6_tests.sh -i | |
release: | |
runs-on: ubuntu-latest | |
needs: [server-build, on-target-test] | |
strategy: | |
matrix: | |
board: [CY8CPROTO-062-4343W] | |
if: startsWith(github.ref, 'refs/tags/v') && github.repository_owner == 'infineon' | |
steps: | |
- name: Download binaries | |
uses: actions/download-artifact@v3 | |
- name: Prepare release assets | |
run: | | |
cd mpy-psoc6_${{ matrix.board }}_${{ needs.server-build.outputs.commit_sha }} | |
mv firmware.hex ../mpy-psoc6_${{ matrix.board }}.hex | |
- name: Build release changelog | |
id: build_changelog | |
uses: mikepenz/release-changelog-builder-action@v3 | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
- name: Release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Micropython PSoC6 ${{ github.ref_name }} | |
files: mpy-psoc6_${{ matrix.board }}.hex | |
body: ${{steps.build_changelog.outputs.changelog}} |