ci: add ARM64 development libraries for cross-compilation #18
Workflow file for this run
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: | |
| - '**' | |
| paths-ignore: | |
| - 'README.md' | |
| pull_request: | |
| branches: | |
| - '**' | |
| paths-ignore: | |
| - 'README.md' | |
| workflow_dispatch: | |
| jobs: | |
| windows: | |
| runs-on: windows-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Install Dependencies | |
| run: | | |
| go mod tidy | |
| - name: Cache Wails CLI | |
| id: cache-wails | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/bin/wails | |
| key: ${{ runner.os }}-${{ matrix.arch }}-wails-cli-v2 | |
| - name: Install wails | |
| if: steps.cache-wails.outputs.cache-hit != 'true' | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: './frontend/pnpm-lock.yaml' | |
| - name: Install frontend dependencies | |
| run: | | |
| cd frontend | |
| pnpm install --frozen-lockfile | |
| - name: Download MaaFramework | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: MaaXYZ/MaaFramework | |
| tag: v5.2.4 | |
| fileName: "MAA-win-${{ | |
| (matrix.arch == 'amd64' && 'x86_64') || | |
| (matrix.arch == 'arm64' && 'aarch64') | |
| }}*" | |
| out-file-path: 'deps/MaaFramework' | |
| extract: true | |
| - name: Build wails app | |
| run: | | |
| wails build -platform windows/${{ matrix.arch }} | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: muu-alpha-windows-${{ matrix.arch }} | |
| path: build/bin/ | |
| if-no-files-found: error | |
| linux: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| arch: [amd64, arm64] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Install Linux Dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev | |
| - name: Install ARM64 Cross-Compilation Toolchain | |
| if: matrix.arch == 'arm64' | |
| run: | | |
| sudo dpkg --add-architecture arm64 | |
| sudo apt-get update | |
| sudo apt-get install -y gcc-aarch64-linux-gnu binutils-aarch64-linux-gnu \ | |
| libgtk-3-dev:arm64 libwebkit2gtk-4.1-dev:arm64 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Install Dependencies | |
| run: | | |
| go mod tidy | |
| - name: Cache Wails CLI | |
| id: cache-wails | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/bin/wails | |
| key: ${{ runner.os }}-${{ matrix.arch }}-wails-cli-v2 | |
| - name: Install wails | |
| if: steps.cache-wails.outputs.cache-hit != 'true' | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: './frontend/pnpm-lock.yaml' | |
| - name: Install frontend dependencies | |
| run: | | |
| cd frontend | |
| pnpm install --frozen-lockfile | |
| - name: Download MaaFramework | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: MaaXYZ/MaaFramework | |
| tag: v5.2.4 | |
| fileName: "MAA-linux-${{ | |
| (matrix.arch == 'amd64' && 'x86_64') || | |
| (matrix.arch == 'arm64' && 'aarch64') | |
| }}*" | |
| out-file-path: 'deps/MaaFramework' | |
| extract: true | |
| - name: Build wails app | |
| env: | |
| CC: ${{ matrix.arch == 'arm64' && 'aarch64-linux-gnu-gcc' || '' }} | |
| PKG_CONFIG_PATH: ${{ matrix.arch == 'arm64' && '/usr/lib/aarch64-linux-gnu/pkgconfig' || '' }} | |
| run: | | |
| wails build -platform linux/${{ matrix.arch }} -tags webkit2_41 | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: muu-alpha-linux-${{ matrix.arch }} | |
| path: build/bin/ | |
| if-no-files-found: error | |
| darwin: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| arch: [ arm64, amd64 ] | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| - name: Setup Go | |
| uses: actions/setup-go@v6 | |
| with: | |
| go-version: 'stable' | |
| - name: Install Dependencies | |
| run: | | |
| go mod tidy | |
| - name: Cache Wails CLI | |
| id: cache-wails | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/go/bin/wails | |
| key: ${{ runner.os }}-${{ matrix.arch }}-wails-cli-v2 | |
| - name: Install wails | |
| if: steps.cache-wails.outputs.cache-hit != 'true' | |
| run: | | |
| go install github.com/wailsapp/wails/v2/cmd/wails@latest | |
| - name: Install pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10 | |
| run_install: false | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: 20 | |
| cache: 'pnpm' | |
| cache-dependency-path: './frontend/pnpm-lock.yaml' | |
| - name: Install frontend dependencies | |
| run: | | |
| cd frontend | |
| pnpm install --frozen-lockfile | |
| - name: Download MaaFramework | |
| uses: robinraju/release-downloader@v1 | |
| with: | |
| repository: MaaXYZ/MaaFramework | |
| tag: v5.2.4 | |
| fileName: "MAA-macos-${{ | |
| (matrix.arch == 'amd64' && 'x86_64') || | |
| (matrix.arch == 'arm64' && 'aarch64') | |
| }}*" | |
| out-file-path: 'deps/MaaFramework' | |
| - name: Build wails app | |
| run: | | |
| wails build -platform darwin/${{ matrix.arch }} | |
| - name: Upload Artifact | |
| uses: actions/upload-artifact@v5 | |
| with: | |
| name: muu-alpha-darwin-${{ matrix.arch }} | |
| path: build/bin/ | |
| if-no-files-found: error |