|
31 | 31 | with: |
32 | 32 | name: ${{ matrix.host }}-x |
33 | 33 | path: bin/x${{ matrix.host == 'windows-latest' && '.exe' || '' }} |
34 | | - |
35 | | - build-template: |
36 | | - strategy: |
37 | | - fail-fast: false |
38 | | - matrix: |
39 | | - host: |
40 | | - - ubuntu-latest |
41 | | - - macos-latest |
42 | | - - windows-latest |
43 | | - opt: |
44 | | - - debug |
45 | | - - release |
46 | | - target: |
47 | | - - platform: linux |
48 | | - arch: x64 |
49 | | - - platform: macos |
50 | | - arch: x64 |
51 | | - - platform: windows |
52 | | - arch: x64 |
53 | | - - platform: android |
54 | | - arch: arm64 |
55 | | - - platform: ios |
56 | | - arch: arm64 |
57 | | - |
58 | | - runs-on: ${{ matrix.host }} |
59 | | - needs: build |
60 | | - steps: |
61 | | - - name: install rust |
62 | | - uses: hecrj/setup-rust-action@v1 |
63 | | - with: |
64 | | - rust-version: stable |
65 | | - |
66 | | - - name: install x |
67 | | - uses: actions/download-artifact@v3 |
68 | | - with: |
69 | | - name: ${{ matrix.host }}-x |
70 | | - - run: chmod +x ./x |
71 | | - if: ${{ matrix.host == 'ubuntu-latest' || matrix.host == 'macos-latest' }} |
72 | | - |
73 | | - - name: install llvm ubuntu |
74 | | - if: ${{ matrix.host == 'ubuntu-latest' }} |
75 | | - run: sudo apt-get update && sudo apt-get install llvm |
76 | | - |
77 | | - - name: install llvm macos |
78 | | - if: ${{ matrix.host == 'macos-latest' }} |
79 | | - run: | |
80 | | - brew install llvm |
81 | | - echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH |
82 | | -
|
83 | | - - name: install java |
84 | | - uses: actions/setup-java@v2 |
85 | | - with: |
86 | | - distribution: temurin |
87 | | - java-version: 11 |
88 | | - |
89 | | - - name: install linux dependencies |
90 | | - if: ${{ matrix.host == 'ubuntu-latest' }} |
91 | | - run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev squashfs-tools |
92 | | - |
93 | | - - name: create project |
94 | | - run: ./x new template |
95 | | - |
96 | | - # only linux can target linux as it is not clear what that even is exactly |
97 | | - # glibc/musl gtk/qt x11/wayland |
98 | | - # windows doesn't support posix symlinks so can't cross compile to macos/ios |
99 | | - - name: build project |
100 | | - if: > |
101 | | - !(matrix.host == 'macos-latest' && matrix.target.platform == 'linux' || |
102 | | - matrix.host == 'windows-latest' && contains(fromJson('["linux", "macos", "ios"]'), matrix.target.platform)) |
103 | | - run: ../x build --platform ${{ matrix.target.platform }} --arch ${{ matrix.target.arch }} --${{ matrix.opt }} |
104 | | - working-directory: template |
0 commit comments