Prepare 0.2.1 release (with latest SDKs) #577
  
    
      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: | |
| branches: | |
| - master | |
| pull_request: | |
| name: xbuild | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - run: cargo fmt --all -- --check | |
| - run: cargo clippy --workspace --examples --tests --all-features -- -D warnings | |
| - run: cargo test | |
| build: | |
| strategy: | |
| matrix: | |
| host: [ubuntu-latest, macos-latest, windows-latest] | |
| runs-on: ${{ matrix.host }} | |
| steps: | |
| - uses: actions/checkout@v3 | |
| - run: cargo install --path xbuild --root . | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ matrix.host }}-x | |
| path: bin/x${{ matrix.host == 'windows-latest' && '.exe' || '' }} | |
| build-template: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| host: | |
| # Disabled until we bump to `dioxus 0.4` with `wry 0.28`. The latest | |
| # Ubuntu provides `libwebkit2gtk-4.1-dev` while these crates still rely | |
| # on `libwebkit2gtk-4.0-dev`: | |
| # - ubuntu-latest | |
| - macos-latest | |
| - windows-latest | |
| opt: | |
| - debug | |
| - release | |
| target: | |
| - platform: linux | |
| arch: x64 | |
| - platform: macos | |
| arch: x64 | |
| - platform: windows | |
| arch: x64 | |
| - platform: android | |
| arch: arm64 | |
| - platform: ios | |
| arch: arm64 | |
| runs-on: ${{ matrix.host }} | |
| needs: build | |
| steps: | |
| - name: install x | |
| uses: actions/download-artifact@v4 | |
| with: | |
| name: ${{ matrix.host }}-x | |
| - run: chmod +x ./x | |
| if: ${{ matrix.host == 'ubuntu-latest' || matrix.host == 'macos-latest' }} | |
| - name: install llvm ubuntu | |
| if: ${{ matrix.host == 'ubuntu-latest' }} | |
| run: sudo apt-get update && sudo apt-get install llvm | |
| - name: install llvm macos | |
| if: ${{ matrix.host == 'macos-latest' }} | |
| run: | | |
| brew install llvm lld | |
| echo "/opt/homebrew/opt/llvm/bin" >> $GITHUB_PATH | |
| - name: install java | |
| uses: actions/setup-java@v2 | |
| with: | |
| distribution: temurin | |
| java-version: 11 | |
| - name: install linux dependencies | |
| if: ${{ matrix.host == 'ubuntu-latest' }} | |
| run: sudo apt-get update && sudo apt-get install libwebkit2gtk-4.0-dev libgtk-3-dev squashfs-tools | |
| - name: create project | |
| run: ./x new template | |
| # only linux can target linux as it is not clear what that even is exactly | |
| # glibc/musl gtk/qt x11/wayland | |
| # windows doesn't support posix symlinks so can't cross compile to macos/ios | |
| - name: build project | |
| if: > | |
| !(matrix.host == 'macos-latest' && matrix.target.platform == 'linux' || | |
| matrix.host == 'windows-latest' && contains(fromJson('["linux", "macos", "ios"]'), matrix.target.platform)) | |
| run: ../x build --platform ${{ matrix.target.platform }} --arch ${{ matrix.target.arch }} --${{ matrix.opt }} | |
| working-directory: template |