Template for cross-building Windows Arm64 projects in WSL #14
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: Cross-build with WSL | |
| on: | |
| pull_request: | |
| workflow_dispatch: | |
| env: | |
| FOO: foo | |
| BAR: C:\bar | |
| jobs: | |
| cross-build: | |
| runs-on: windows-11-arm | |
| defaults: | |
| run: | |
| shell: wsl --user root bash --noprofile --norc -euo pipefail "$(s="$(wslpath '{0}')" && sed -i 's/\r$//' "$s" && echo "$s")" | |
| env: | |
| WSLENV: FOO:BAR/p:GITHUB_ENV/p:GITHUB_OUTPUT/p:GITHUB_STEP_SUMMARY/p | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| with: | |
| path: ${{ github.workspace }} | |
| - name: Install zstd | |
| shell: powershell | |
| run: | | |
| .github/scripts/install-zstd.ps1 | |
| - name: Install dependencies | |
| run: | | |
| .github/scripts/wsl/install-dependencies.sh | |
| - name: Build | |
| run: | | |
| .github/scripts/wsl/build.sh $FOO $BAR |