Attempt build of x64 on arm64 runner #149
  
    
      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
    
  
  
    
  | on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: write | |
| env: | |
| SKIP_RISCV: 0 | |
| SKIP_OPENOCD: 0 | |
| jobs: | |
| build_windows: | |
| name: Build Windows | |
| # runs-on: [self-hosted, Windows, x64] | |
| runs-on: 'windows-latest' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # - name: Setup SSH Auth | |
| # if: runner.environment == 'github-hosted' | |
| # uses: webfactory/[email protected] | |
| # with: | |
| # ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Setup MSYS2 | |
| uses: msys2/setup-msys2@v2 | |
| - name: Build | |
| run: | | |
| subst P: . | |
| P: | |
| ./build.ps1 ./config/x64-win.json -SkipSigning -MSYS2Path (msys2 -c 'cygpath -m /').TrimEnd('\/') | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tools-x64-win | |
| path: | | |
| bin/picotool-*-x64-win.zip | |
| bin/pico-sdk-tools-*-x64-win.zip | |
| bin/openocd-*-x64-win.zip | |
| bin/riscv-toolchain-*-x64-win.zip | |
| - name: Add Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| bin/picotool-*-x64-win.zip | |
| bin/pico-sdk-tools-*-x64-win.zip | |
| bin/openocd-*-x64-win.zip | |
| bin/riscv-toolchain-*-x64-win.zip | |
| build_macos_arm64: | |
| name: Build MacOS Arm64 | |
| # runs-on: [self-hosted, macOS] | |
| runs-on: 'macos-14' | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Homebrew | |
| if: runner.environment == 'github-hosted' | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@master | |
| - name: Set up x86_64 Homebrew | |
| if: runner.environment == 'github-hosted' | |
| run: | | |
| NONINTERACTIVE=1 arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| # - name: Setup SSH Auth | |
| # if: runner.environment == 'github-hosted' | |
| # uses: webfactory/[email protected] | |
| # with: | |
| # ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Build | |
| run: ./build_macos.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tools-mac-arm64 | |
| path: | | |
| bin/picotool-*-mac.zip | |
| bin/pico-sdk-tools-*-mac.zip | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| - name: Add Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| bin/picotool-*-mac.zip | |
| bin/pico-sdk-tools-*-mac.zip | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| build_macos_x64: | |
| name: Build MacOS x64 | |
| runs-on: 'macos-13' | |
| env: | |
| # Universal picotool is built on arm64 | |
| SKIP_PICOTOOL: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Homebrew | |
| if: runner.environment == 'github-hosted' | |
| id: set-up-homebrew | |
| uses: Homebrew/actions/setup-homebrew@master | |
| - name: Build | |
| run: ./build_macos.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tools-mac-x64 | |
| path: | | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| - name: Add Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| build_macos_x64_on_arm64: | |
| name: Build MacOS x64 on arm64 | |
| runs-on: 'macos-14' | |
| env: | |
| # Universal picotool is built on arm64 | |
| SKIP_PICOTOOL: 1 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up x86_64 Homebrew | |
| if: runner.environment == 'github-hosted' | |
| run: | | |
| NONINTERACTIVE=1 arch -x86_64 /bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)" | |
| - name: Build | |
| run: arch -x86_64 ./build_macos.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tools-mac-x64-on-arm64 | |
| path: | | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| - name: Add Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| bin/openocd-*-mac.zip | |
| bin/riscv-toolchain-*.zip | |
| build_linux: | |
| name: Build Linux | |
| # strategy: | |
| # matrix: | |
| # os: [[self-hosted, linux, x64], [self-hosted, linux, arm64]] | |
| strategy: | |
| matrix: | |
| os: [ubuntu-22.04, [self-hosted, linux, arm64]] | |
| runs-on: ${{ matrix.os }} | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| # - name: Setup SSH Auth | |
| # if: runner.environment == 'github-hosted' | |
| # uses: webfactory/[email protected] | |
| # with: | |
| # ssh-private-key: ${{ secrets.SSH_KEY }} | |
| - name: Build | |
| run: ./build_linux.sh | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: tools-lin-${{ runner.arch }} | |
| path: | | |
| bin/picotool-*-lin.tar.gz | |
| bin/pico-sdk-tools-*-lin.tar.gz | |
| bin/openocd-*-lin.tar.gz | |
| bin/riscv-toolchain-*-lin.tar.gz | |
| - name: Add Release Asset | |
| uses: softprops/action-gh-release@v2 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: | | |
| bin/picotool-*-lin.tar.gz | |
| bin/pico-sdk-tools-*-lin.tar.gz | |
| bin/openocd-*-lin.tar.gz | |
| bin/riscv-toolchain-*-lin.tar.gz | |