build: Skip SD/MMC overlays and cyw-fmac for RZ/V2N machine #119
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 | |
| on: | |
| push: | |
| branches: [ "develop-vlp4", "rzv2n-dev" ] | |
| pull_request: | |
| branches: [ "develop-vlp4", "rzv2n-dev" ] | |
| schedule: | |
| - cron: "0 0 * * 5" | |
| # Allows you to run this workflow manually from the Actions tab | |
| workflow_dispatch: | |
| jobs: | |
| prepare_container: | |
| runs-on: self-hosted | |
| outputs: | |
| uid: ${{ steps.uid_step.outputs.userid }} | |
| gid: ${{ steps.uid_step.outputs.groupid }} | |
| steps: | |
| # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
| - uses: actions/checkout@v4 | |
| - name: Get user id/group | |
| id: uid_step | |
| run: | | |
| echo "userid=$(id -u)" >> "$GITHUB_OUTPUT" | |
| echo "groupid=$(id -g)" >> "$GITHUB_OUTPUT" | |
| - name: Set up Docker Buildx | |
| uses: docker/setup-buildx-action@v3 | |
| with: | |
| buildkitd-config: /etc/docker/cibuilder.toml | |
| - name: Login to Docker Registry | |
| uses: docker/login-action@v3 | |
| with: | |
| registry: ciserver.ci:5000 | |
| username: ${{ secrets.CI_CACHE_REGISTRY_LOGIN }} | |
| password: ${{ secrets.CI_CACHE_REGISTRY_PASSWORD }} | |
| - name: Build and push | |
| uses: docker/build-push-action@v6 | |
| with: | |
| context: docker | |
| push: true | |
| tags: ciserver.ci:5000/${{ github.repository_id }}/develop-vlp4:latest | |
| cache-from: type=registry,ref=ciserver.ci:5000/${{ github.repository_id }}:cache | |
| cache-to: type=registry,ref=ciserver.ci:5000/${{ github.repository_id }}:cache,mode=max | |
| file: docker/Dockerfile | |
| info: | |
| runs-on: self-hosted | |
| timeout-minutes: 10 | |
| outputs: | |
| build_date: ${{ steps.tag_step.outputs.build_date }} | |
| build_rev: ${{ steps.tag_step.outputs.build_rev }} | |
| build_ref: ${{ steps.tag_step.outputs.build_ref }} | |
| build_tag: ${{ steps.tag_step.outputs.build_date }}_${{ steps.tag_step.outputs.build_rev }} | |
| steps: | |
| - name: Generate build tags | |
| shell: bash {0} | |
| id: tag_step | |
| run: | | |
| build_date="$(date +%Y-%m-%d)" | |
| build_rev="$(echo ${GITHUB_SHA} | head -zc 7)" | |
| build_ref="${GITHUB_REF}" | |
| echo "build_date=$build_date" >> "$GITHUB_OUTPUT" | |
| echo "build_rev=$build_rev" >> "$GITHUB_OUTPUT" | |
| echo "build_ref=$build_ref" >> "$GITHUB_OUTPUT" | |
| build_images: | |
| needs: | |
| - info | |
| - prepare_container | |
| runs-on: self-hosted | |
| container: | |
| image: ciserver.ci:5000/${{ github.repository_id }}/develop-vlp4:latest | |
| credentials: | |
| username: ${{ secrets.CI_CACHE_REGISTRY_LOGIN }} | |
| password: ${{ secrets.CI_CACHE_REGISTRY_PASSWORD }} | |
| options: --user "${{ needs.prepare_container.outputs.uid }}:${{ needs.prepare_container.outputs.gid }}" | |
| outputs: | |
| local_artifacts_path: ${{ steps.store_path.outputs.local_artifacts_path }} | |
| steps: | |
| - name: Checkout repo | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| - name: Fetch cache from server | |
| uses: tespkg/actions-cache/restore@v1 | |
| with: | |
| endpoint: ciserver.ci | |
| port: 9000 | |
| insecure: true | |
| accessKey: ${{ secrets.CI_CACHE_MINIO_ACCESS }} | |
| secretKey: ${{ secrets.CI_CACHE_MINIO_SECRET }} | |
| bucket: cicache | |
| use-fallback: false | |
| key: ${{ github.repository }}/develop-vlp4 | |
| path: build/cache/cicache | |
| - name: Register buildroot mirror | |
| run: echo 'BR2_PRIMARY_SITE="http://ciserver.ci:8000/cimirror/buildroot_mirror"' >> configs/buildroot/rz-solidrun_defconfig | |
| - name: Build for RZ/G2UL | |
| shell: bash | |
| run: | | |
| COMPRESSION_FORMAT=xz MACHINE=rzg2ul-solidrun ./runme.sh | |
| COMPRESSION_FORMAT=xz DISTRO=debian MACHINE=rzg2ul-solidrun ./runme.sh | |
| - name: Build for RZ/G2LC | |
| shell: bash | |
| run: | | |
| COMPRESSION_FORMAT=xz MACHINE=rzg2lc-solidrun ./runme.sh | |
| COMPRESSION_FORMAT=xz DISTRO=debian MACHINE=rzg2lc-solidrun ./runme.sh | |
| - name: Build for RZ/G2L | |
| shell: bash | |
| run: | | |
| COMPRESSION_FORMAT=xz MACHINE=rzg2l-solidrun ./runme.sh | |
| COMPRESSION_FORMAT=xz DISTRO=debian MACHINE=rzg2l-solidrun ./runme.sh | |
| - name: Build for RZ/V2L | |
| shell: bash | |
| run: | | |
| COMPRESSION_FORMAT=xz MACHINE=rzv2l-solidrun ./runme.sh | |
| COMPRESSION_FORMAT=xz DISTRO=debian MACHINE=rzv2l-solidrun ./runme.sh | |
| - name: Build for RZ/V2N | |
| shell: bash | |
| run: | | |
| COMPRESSION_FORMAT=xz MACHINE=rzv2n-solidrun ./runme.sh | |
| COMPRESSION_FORMAT=xz DISTRO=debian MACHINE=rzv2n-solidrun ./runme.sh | |
| - name: Copy deploy artifacts | |
| shell: bash | |
| run: | | |
| mkdir deploy | |
| cp images/*-bootloader-*.img deploy | |
| cp images/*.img.xz deploy | |
| cp images/*.img.bmap deploy | |
| - name: Store local storage path for this build | |
| id: store_path | |
| run: | | |
| echo "local_artifacts_path=${{ github.repository_id }}/${{ needs.info.outputs.build_tag }}" >> "$GITHUB_OUTPUT" | |
| - name: Deploy to the local minio storage | |
| uses: yakubique/minio-upload@v1.1.3 | |
| with: | |
| endpoint: http://ciserver.ci:9000 | |
| insecure: true | |
| access_key: ${{ secrets.CI_CACHE_MINIO_ACCESS }} | |
| secret_key: ${{ secrets.CI_CACHE_MINIO_SECRET }} | |
| bucket: cipublish | |
| source: ./deploy/ | |
| target: "/${{ steps.store_path.outputs.local_artifacts_path }}/" | |
| recursive: true | |
| - name: Update cache on the server | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| uses: tespkg/actions-cache/save@v1 | |
| with: | |
| endpoint: ciserver.ci | |
| port: 9000 | |
| insecure: true | |
| accessKey: ${{ secrets.CI_CACHE_MINIO_ACCESS }} | |
| secretKey: ${{ secrets.CI_CACHE_MINIO_SECRET }} | |
| bucket: cicache | |
| use-fallback: false | |
| key: ${{ github.repository }}/develop-vlp4 | |
| path: build/cache/cicache | |
| - name: Prepare mirror | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| shell: bash | |
| run: | | |
| mkdir buildroot_mirror | |
| cp -r build/cache/buildroot_dl/* buildroot_mirror | |
| - name: Update download mirror | |
| uses: yakubique/minio-upload@v1.1.3 | |
| if: github.event_name == 'schedule' || github.event_name == 'workflow_dispatch' | |
| with: | |
| endpoint: http://ciserver.ci:9000 | |
| insecure: true | |
| access_key: ${{ secrets.CI_CACHE_MINIO_ACCESS }} | |
| secret_key: ${{ secrets.CI_CACHE_MINIO_SECRET }} | |
| bucket: cimirror | |
| source: buildroot_mirror | |
| target: "/" | |
| recursive: true | |
| publish_images: | |
| needs: | |
| - info | |
| - build_images | |
| runs-on: self-hosted | |
| if: (github.ref == 'refs/heads/develop-vlp4' || github.ref == 'refs/heads/rzv2n-dev') && github.event_name != 'pull_request' | |
| steps: | |
| - name: Download an artifacts from MinIO | |
| uses: yakubique/minio-download@v1.1.1 | |
| with: | |
| endpoint: http://ciserver.ci:9000 | |
| insecure: true | |
| access_key: ${{ secrets.CI_CACHE_MINIO_ACCESS }} | |
| secret_key: ${{ secrets.CI_CACHE_MINIO_SECRET }} | |
| bucket: cipublish | |
| source: "/${{ needs.build_images.outputs.local_artifacts_path }}/" | |
| target: "." | |
| recursive: true | |
| - name: Assign a build tag | |
| run: | | |
| mkdir -p debian | |
| mkdir -p buildroot | |
| cp *-bootloader-*.img debian | |
| cp *-bootloader-*.img buildroot | |
| cp *-debian-*.img.* debian | |
| cp *-buildroot-*.img.* buildroot | |
| - name: Upload Debian to S3 | |
| uses: shallwefootball/upload-s3-action@v1.3.3 | |
| with: | |
| aws_key_id: ${{ secrets.IMAGES_S3_ACCESS }} | |
| aws_secret_access_key: ${{ secrets.IMAGES_S3_SECRET }} | |
| aws_bucket: ${{ secrets.IMAGES_S3_BUCKET }} | |
| endpoint: ${{ secrets.IMAGES_S3_HOST }} | |
| source_dir: debian | |
| destination_dir: RZ/Debian/vlp4/${{ needs.info.outputs.build_tag }} | |
| - name: Upload Buildroot to S3 | |
| uses: shallwefootball/upload-s3-action@v1.3.3 | |
| with: | |
| aws_key_id: ${{ secrets.IMAGES_S3_ACCESS }} | |
| aws_secret_access_key: ${{ secrets.IMAGES_S3_SECRET }} | |
| aws_bucket: ${{ secrets.IMAGES_S3_BUCKET }} | |
| endpoint: ${{ secrets.IMAGES_S3_HOST }} | |
| source_dir: buildroot | |
| destination_dir: RZ/Buildroot/vlp4/${{ needs.info.outputs.build_tag }} | |
| test_images: | |
| needs: | |
| - info | |
| - build_images | |
| runs-on: self-hosted | |
| timeout-minutes: 90 | |
| steps: | |
| - name: Generate Temporary Image Download URLs | |
| id: dl_url | |
| shell: bash {0} | |
| run: | | |
| echo "rzg2ul_buildroot_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2ul-solidrun-sd-buildroot-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzg2ul_debian_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2ul-solidrun-sd-debian-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzg2lc_buildroot_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2lc-solidrun-sd-buildroot-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzg2lc_debian_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2lc-solidrun-sd-debian-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzg2l_buildroot_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2l-solidrun-sd-buildroot-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzg2l_debian_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzg2l-solidrun-sd-debian-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzv2l_buildroot_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzv2l-solidrun-sd-buildroot-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzv2l_debian_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzv2l-solidrun-sd-debian-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzv2n_buildroot_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzv2n-solidrun-sd-buildroot-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| echo "rzv2n_debian_url=http://ciserver.ci:8000/cipublish/${{ needs.build_images.outputs.local_artifacts_path }}/rzv2n-solidrun-sd-debian-${{ needs.info.outputs.build_rev }}.img.xz" >> "$GITHUB_OUTPUT" | |
| - name: Checkout LAVA action | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: SolidRun/lava-test-definitions | |
| path: .lava-action | |
| ssh-key: ${{ secrets.LAVA_ACTION_SECRET }} | |
| - name: Test Images on LAVA | |
| id: submit | |
| uses: ./.lava-action/.github/actions/lava-submit | |
| with: | |
| server: 192.168.15.184 | |
| port: 8001 | |
| timeout: 36000 | |
| jobs: | | |
| [ | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2ul"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2ul_buildroot_url }}", | |
| "description": "RZ/G2UL Buildroot - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2ul"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2ul_debian_url }}", | |
| "description": "RZ/G2UL Debian - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2lc"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2lc_buildroot_url }}", | |
| "description": "RZ/G2LC Buildroot - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2lc"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2lc_debian_url }}", | |
| "description": "RZ/G2LC Debian - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2l"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2l_buildroot_url }}", | |
| "description": "RZ/G2L Buildroot - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_g2l"], | |
| "image_url": "${{ steps.dl_url.outputs.rzg2l_debian_url }}", | |
| "description": "RZ/G2L Debian - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_v2l"], | |
| "image_url": "${{ steps.dl_url.outputs.rzv2l_buildroot_url }}", | |
| "description": "RZ/V2L Buildroot - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_v2l"], | |
| "image_url": "${{ steps.dl_url.outputs.rzv2l_debian_url }}", | |
| "description": "RZ/V2L Debian - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_v2n"], | |
| "image_url": "${{ steps.dl_url.outputs.rzv2n_buildroot_url }}", | |
| "description": "RZ/V2N Buildroot - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| }, | |
| { | |
| "device_type": "rz", | |
| "tags": ["rz_v2n"], | |
| "image_url": "${{ steps.dl_url.outputs.rzv2n_debian_url }}", | |
| "description": "RZ/V2N Debian - build_rzg2lc/${{ needs.info.outputs.build_ref }} (${{ needs.info.outputs.build_rev }})", | |
| "compression": "xz", | |
| "all_devices": false | |
| } | |
| ] |