riscv-windows #38
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: riscv-windows | |
| on: | |
| # Workflow dispatched manually | |
| workflow_dispatch: | |
| # Workflow under a monthly schedule | |
| schedule: | |
| - cron: '30 0 1 * *' | |
| permissions: | |
| contents: read | |
| packages: write | |
| jobs: | |
| # Generate the -full image with the IAR Build tools for RISC-V. | |
| # It includes: -minimal, `cspybat`, `iarbuild` and `cstat`, | |
| # and all vendor-specific device support | |
| riscv-full: | |
| strategy: | |
| matrix: | |
| target: [ riscv ] | |
| cfg: | |
| - { version: 3.40.2, target-tag: 970 } | |
| - { version: 3.40.1, target-tag: 650 } | |
| os: [ 2022, 2025 ] | |
| runs-on: windows-${{ matrix.os }} | |
| steps: | |
| # https://github.com/actions/runner-images/issues/13729 | |
| - name: Ensure Docker is running (Windows) | |
| shell: pwsh | |
| run: | | |
| Start-Service docker | |
| for ($i = 0; $i -lt 30; $i++) { | |
| docker info *> $null | |
| if ($LASTEXITCODE -eq 0) { exit 0 } | |
| Start-Sleep 2 | |
| } | |
| docker info | |
| - uses: actions/checkout@main | |
| - if: github.event_name != 'pull_request' | |
| uses: docker/login-action@v4 | |
| with: | |
| registry: ghcr.io | |
| username: ${{ github.repository_owner }} | |
| password: ${{ secrets.GITHUB_TOKEN }} | |
| - if: github.event_name != 'pull_request' | |
| run: | | |
| docker build -t ghcr.io/${{ github.repository_owner }}/${{ matrix.target }}:${{ matrix.cfg.version }}-windows-${{ matrix.os }}-full ` | |
| -f .github/workflows/windows/Dockerfile-${{ matrix.target }}.full ` | |
| --build-arg TARGET=${{ matrix.target }} ` | |
| --build-arg VERSION=${{ matrix.cfg.version }} ` | |
| --build-arg TARGET_TAG=${{ matrix.cfg.target-tag }} ` | |
| --build-arg WINVER=${{ matrix.os }} ` | |
| .github/workflows/windows; | |
| docker push ghcr.io/${{ github.repository_owner }}/${{ matrix.target}}:${{ matrix.cfg.version }}-windows-${{ matrix.os }}-full; | |
| shell: pwsh |