only sshx on ios builds #1
  
    
      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" | ||
| Check failure on line 1 in .github/workflows/build.yml 
     | ||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| upload_artifacts: | ||
| type: boolean | ||
| default: true | ||
| jobs: | ||
| cargo-build-linux: | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - "x86_64-unknown-linux-gnu" | ||
| profile: | ||
| - "debug" | ||
| - "release" | ||
| integration: | ||
| - "godot" | ||
| - "unity" | ||
| - "flutter" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: "Cache Cargo Home" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo | ||
| nobodywho/target | ||
| key: ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}- | ||
| - name: "Setup rust toolchain" | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
| . "$HOME/.cargo/env" | ||
| rustup update stable | ||
| rustup default stable | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
| - name: "Install distro dependencies" | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libclang-dev cmake libshaderc-dev libvulkan-dev glslc | ||
| - name: Setup Flutter SDK | ||
| if: matrix.integration == 'flutter' | ||
| uses: flutter-actions/setup-flutter@v4 | ||
| with: | ||
| channel: stable | ||
| version: 3.35.5 | ||
| - name: "Compile for linux" | ||
| run: cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} --locked | ||
| working-directory: ./nobodywho | ||
| - name: "Rename built file" | ||
| run: | | ||
| cp ./nobodywho/target/${{ matrix.target }}/${{ matrix.profile }}/libnobodywho_${{ matrix.integration }}.so ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.so | ||
| - name: "Upload build artifact" | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }} | ||
| path: ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.so | ||
| cargo-build-windows: | ||
| runs-on: windows-latest | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - "x86_64-pc-windows-msvc" | ||
| profile: | ||
| - "debug" | ||
| - "release" | ||
| integration: | ||
| - "godot" | ||
| - "unity" | ||
| - "flutter" | ||
| env: | ||
| RUSTFLAGS: >- | ||
| -l Advapi32 | ||
| steps: | ||
| - name: Checkout code | ||
| uses: actions/checkout@v4 | ||
| - name: "Cache Cargo Home" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo | ||
| nobodywho/target | ||
| key: ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}- | ||
| - name: Install Rust | ||
| uses: actions-rs/toolchain@v1 | ||
| with: | ||
| toolchain: stable | ||
| target: ${{ matrix.target }} | ||
| - name: Install Vulkan SDK | ||
| uses: jakoch/install-vulkan-sdk-action@v1.2.5 | ||
| with: | ||
| vulkan_version: 1.3.296.0 | ||
| cache: true | ||
| install_runtime: true | ||
| stripdown: true | ||
| - name: Setup Flutter SDK | ||
| if: matrix.integration == 'flutter' | ||
| uses: flutter-actions/setup-flutter@v4 | ||
| with: | ||
| channel: stable | ||
| version: 3.35.5 | ||
| - name: Build with Cargo | ||
| # move things into a shortly-named dir in the root, because windows is made by fuckwits who think limiting paths to 260 chars is ok | ||
| run: | | ||
| mv ./nobodywho/* C:/ | ||
| cd C:/ | ||
| cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} --locked | ||
| env: | ||
| RUSTFLAGS: >- | ||
| -l Advapi32 | ||
| - name: "Rename built files" | ||
| run: | | ||
| cp C:/target/${{ matrix.target }}/${{ matrix.profile }}/nobodywho_${{ matrix.integration }}.dll ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dll | ||
| cp C:/target/${{ matrix.target }}/${{ matrix.profile }}/nobodywho_${{ matrix.integration }}.pdb ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.pdb | ||
| - name: "Upload build artifacts" | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }} | ||
| path: | | ||
| ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dll | ||
| ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.pdb | ||
| cargo-build-macos: | ||
| runs-on: macos-15 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - "x86_64-apple-darwin" | ||
| - "aarch64-apple-darwin" | ||
| - "aarch64-apple-ios" | ||
| profile: | ||
| - "debug" | ||
| - "release" | ||
| integration: | ||
| - "godot" | ||
| - "unity" | ||
| - "flutter" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: "Cache Cargo Home" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: ~/.cargo | ||
| key: ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-home-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}- | ||
| - run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
| . "$HOME/.cargo/env" | ||
| rustup update stable | ||
| rustup default stable | ||
| rustup target add ${{ matrix.target }} | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
| - name: Setup Flutter SDK | ||
| if: matrix.integration == 'flutter' | ||
| uses: flutter-actions/setup-flutter@v4 | ||
| with: | ||
| channel: stable | ||
| version: 3.35.5 | ||
| - name: SSHX for debugging | ||
| if: matrix.target == "aarch64-apple-ios" | ||
| run: "curl -sSf https://sshx.io/get | sh -s run" | ||
| - run: cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} --locked | ||
| working-directory: ./nobodywho | ||
| - name: "Rename built file" | ||
| run: cp ./nobodywho/target/${{ matrix.target }}/${{ matrix.profile }}/libnobodywho_${{ matrix.integration }}.dylib ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dylib | ||
| - name: "Upload build artifact" | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }} | ||
| path: ./nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.dylib | ||
| cargo-build-android: | ||
| runs-on: ubuntu-24.04 | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| target: | ||
| - "aarch64-linux-android" | ||
| profile: | ||
| - "debug" | ||
| - "release" | ||
| integration: | ||
| - "godot" | ||
| - "flutter" | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - name: "Cache Cargo Home" | ||
| uses: actions/cache@v4 | ||
| with: | ||
| path: | | ||
| ~/.cargo | ||
| nobodywho/target | ||
| key: ${{ runner.os }}-cargo-home-${{ matrix.target }}-${{ matrix.profile }}-${{ hashFiles('**/Cargo.lock') }} | ||
| restore-keys: | | ||
| ${{ runner.os }}-cargo-home-${{ matrix.target }}-${{ matrix.profile }}- | ||
| - name: "Setup rust toolchain" | ||
| run: | | ||
| curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y | ||
| . "$HOME/.cargo/env" | ||
| rustup update stable | ||
| rustup default stable | ||
| rustup target add ${{ matrix.target }} | ||
| echo "$HOME/.cargo/bin" >> $GITHUB_PATH | ||
| - name: "Install distro dependencies" | ||
| run: | | ||
| sudo apt-get update | ||
| sudo apt-get install -y libclang-dev cmake libshaderc-dev libvulkan-dev glslc gcc-multilib | ||
| - name: "Install Android NDK" | ||
| uses: nttld/setup-ndk@v1 | ||
| id: setup-ndk | ||
| with: | ||
| ndk-version: r28 | ||
| add-to-path: false | ||
| - name: Setup Flutter SDK | ||
| if: matrix.integration == 'flutter' | ||
| uses: flutter-actions/setup-flutter@v4 | ||
| with: | ||
| channel: stable | ||
| version: 3.35.5 | ||
| - name: "Compile for android" | ||
| run: cargo build -p nobodywho-${{ matrix.integration }} --verbose --target ${{ matrix.target }} ${{ matrix.profile == 'release' && '--release' || '' }} | ||
| working-directory: ./nobodywho | ||
| env: | ||
| ANDROID_NDK: "${{ steps.setup-ndk.outputs.ndk-path }}" | ||
| CARGO_TARGET_AARCH64_LINUX_ANDROID_LINKER: "${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android34-clang" | ||
| CARGO_TARGET_AARCH64_LINUX_ANDROID_AR: "${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" | ||
| CC_aarch64_linux_android: "${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/aarch64-linux-android31-clang" | ||
| AR_aarch64_linux_android: "${{ steps.setup-ndk.outputs.ndk-path }}/toolchains/llvm/prebuilt/linux-x86_64/bin/llvm-ar" | ||
| # XXX: .so files for android in godot MUST start with "lib" | ||
| - name: "Rename built file" | ||
| run: cp ./nobodywho/target/${{ matrix.target }}/${{ matrix.profile }}/libnobodywho_${{ matrix.integration }}.so ./libnobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.so | ||
| - name: "Upload build artifact" | ||
| uses: actions/upload-artifact@v4 | ||
| with: | ||
| name: nobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }} | ||
| path: ./libnobodywho-${{ matrix.integration }}-${{ matrix.target }}-${{ matrix.profile }}.so | ||