[NO REVIEW NEEDED YET] migration-in-progress: Migrate pico, maxim and xilinx platform to github actions #2
This file contains hidden or 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: Build NO-OS projects | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - next_stable | |
| - release | |
| - '20*' | |
| paths-ignore: | |
| - '**/*.rst' | |
| - '**/*.md' | |
| push: | |
| branches: | |
| - main | |
| paths-ignore: | |
| - '**/*.rst' | |
| - '**/*.md' | |
| permissions: | |
| contents: read | |
| id-token: write | |
| checks: write | |
| pull-requests: write | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| build-projects: | |
| env: | |
| CLOUDSMITH_API_KEY: ${{ secrets.CLOUDSMITH_API_KEY }} | |
| TOOLS_REPO: ${{ secrets.TOOLS_REPO }} | |
| BLACKLIST_URL: ${{ secrets.BLACKLIST_URL }} | |
| XILINX_SETTINGS: ${{ secrets.XILINX_SETTINGS }} | |
| HDL_BRANCH: 'main' | |
| VIVADO_SETTINGS: ${{ secrets.VIVADO_SETTINGS }} | |
| VIVADO_PATH: ${{ secrets.VIVADO_PATH }} | |
| VITIS_PATH: ${{ secrets.VITIS_PATH }} | |
| BUILDS_DIR: ${{ github.workspace }}/builds | |
| RELEASES_DIR: ${{ github.workspace }}/latest_build | |
| LOGS_DIR: ${{ github.workspace }}/logs | |
| runs-on: "noos-runner" | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: false | |
| - name: Setup platform env | |
| shell: sh | |
| run: | | |
| ${{ github.workspace }}/.github/scripts/setup-platform-env.sh | |
| env: | |
| PLATFORM: ${{ matrix.platform }} | |
| WORKSPACE: ${{ github.workspace }} | |
| - name: Build project | |
| shell: sh | |
| run: | | |
| echo "Setup cloudsmith helper ..." | |
| wget -P ./tools/scripts/ \ | |
| https://raw.githubusercontent.com/analogdevicesinc/wiki-scripts/refs/heads/main/utils/cloudsmith_utils/cloudsmith_helper.py -O ./tools/scripts/cloudsmith_temp.py | |
| cat tools/scripts/cloudsmith_temp.py | sed 's#/usr/bin/python3#/usr/bin/env python3#' > tools/scripts/cloudsmith_helper.py | |
| echo "Running project build ..." | |
| ${{ github.workspace }}/tools/scripts/build_projects.py \ | |
| ${{ github.workspace }} \ | |
| -export_dir ${{ env.RELEASES_DIR }} \ | |
| -log_dir ${{ env.LOGS_DIR }} \ | |
| -builds_dir ${{ env.BUILDS_DIR }} \ | |
| -platform xilinx \ | |
| -hdl_branch ${{ env.HDL_BRANCH }} | |
| env: | |
| CLOUDSMITH_API_KEY: ${{ env.CLOUDSMITH_API_KEY }} | |
| TOKEN: ${{ secrets.GH_IS_TOKEN }} | |
| - name: Upload release artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ env.RELEASES_DIR }} | |
| name: release_${{ matrix.platform }}_${{ github.job }} | |
| - name: Upload logs artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ env.LOGS_DIR }} | |
| name: logs_${{ matrix.platform }}_${{ github.job }} | |
| unit-tests: | |
| if: ${{ github.event_name == 'pull_request' }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Setup test tools | |
| shell: bash | |
| run: | | |
| sudo apt-get install ruby-full | |
| sudo gem install ceedling | |
| pip install gcovr==4.1 | |
| find tests -name "project.yml" -type f | while read project_file; do | |
| dir=$(dirname "$project_file") | |
| cd "$dir" && ceedling test:all && cd - | |
| done | |
| - name: Publish test results | |
| uses: mikepenz/action-junit-report@bccf2e31636835cf0874589931c4116687171386 # @v6.4.0 | |
| with: | |
| report_paths: tests/drivers/**/build/artifacts/test/*.xml | |
| include_passed: true | |
| pr_id: ${{github.event.pull_request.number}} | |
| comment: true | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| updateComment: true | |