Migrate pico, maxim and xilinx platform to github actions #1
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 projects for Maxim platform | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - next_stable | |
| - 'release/*' | |
| - '20*' | |
| paths-ignore: | |
| - '**/*.rst' | |
| - '**/*.md' | |
| - 'drivers/platform/stm32/**' | |
| - 'drivers/platform/xilinx/**' | |
| - 'drivers/platform/aducm3029/**' | |
| - 'drivers/platform/pico/**' | |
| - '.github/config/**' | |
| - '.github/scripts/**' | |
| push: | |
| branches: | |
| - main | |
| - next_stable | |
| - 'release/*' | |
| - '20*' | |
| paths-ignore: | |
| - '**/*.rst' | |
| - '**/*.md' | |
| - 'drivers/platform/stm32/**' | |
| - 'drivers/platform/xilinx/**' | |
| - 'drivers/platform/aducm3029/**' | |
| - 'drivers/platform/pico/**' | |
| - '.github/config/**' | |
| - '.github/scripts/**' | |
| 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 }} | |
| HDL_BRANCH: 'main' | |
| BUILDS_DIR: ${{ github.workspace }}/builds | |
| RELEASES_DIR: ${{ github.workspace }}/latest_build | |
| LOGS_DIR: ${{ github.workspace }}/logs | |
| container: | |
| image: ${{ vars.DOCKER_REGISTRY }}/maxim-platform:latest | |
| credentials: | |
| username: ${{ secrets.CLOUDSMITH_USER }} | |
| password: ${{ secrets.CLOUDSMITH_API_KEY }} | |
| volumes: | |
| - ${{ github.workspace }}:${{ github.workspace }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| with: | |
| submodules: recursive | |
| - name: Building for platform Maxim | |
| shell: sh | |
| run: | | |
| echo "Setup cloudsmith helper ..." | |
| wget 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 | |
| rm tools/scripts/cloudsmith_temp.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 maxim \ | |
| -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_maxim_${{ github.job }} | |
| - name: Upload logs artifact | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| path: ${{ env.LOGS_DIR }} | |
| name: logs_maxim_${{ github.job }} |