diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index e4100f605..89ba2846e 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -14,323 +14,6 @@ jobs: - build-flt-orc: - needs: [cache-submodule] - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - uses: actions/setup-java@v4 - with: - distribution: 'temurin' - java-version: '11' - - - run: ./app-flutter.sh orchid && cd app-flutter && make - - - - build-ios-app: - needs: [cache-submodule] - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: debug=ldid make -j3 -C app-ios precache='--no-android' - - - build-and-app: - needs: [cache-submodule] - runs-on: ubuntu-latest - - steps: - - run: sudo rm -rf /opt - - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: env/setup-ndk.sh - - - run: make -j3 -C app-android precache='--no-ios' - - - uses: actions/upload-artifact@v4 - with: - name: orchid-apk - path: app-android/out-and/Orchid.apk - - - build-and-dkr: - needs: [cache-submodule] - runs-on: ubuntu-latest - - steps: - - run: sudo rm -rf /opt - - - uses: actions/checkout@v4 - - run: env/setup-git.sh - - uses: ./.github/actions/submodule - - - run: cd app-android && env/docker.sh -j3 - - - - build-mac-app: - needs: [cache-submodule] - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: debug=ldid make -j3 -C app-macos precache='--no-android --no-ios --macos' - - - build-mac-snd: - needs: [cache-submodule] - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: make -j3 -C eth-sender - - - uses: actions/upload-artifact@v4 - with: - name: cj-mac - path: eth-sender/out-mac/x86_64/cj - - - build-mac-cli: - needs: [cache-submodule] - runs-on: macos-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: make -j3 -C cli-shared - - - uses: actions/upload-artifact@v4 - with: - name: orchidcd-mac - path: cli-shared/out-mac/x86_64/orchidcd - - - build-mac-srv: - needs: [cache-submodule] - runs-on: macos-13 - - if: ${{ false }} # XXX: Hypervisor.framework - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - uses: ./.github/actions/nerdctl - - - run: make -j3 -C srv-daemon - - - uses: actions/upload-artifact@v4 - with: - name: orchidd-mac - path: srv-daemon/out-mac/x86_64/orchidd - - - run: git status - - - - # XXX: ubuntu-latest defaults to r25c NDK - # bumping to ubuntu-24.04 was easiest fix - - - build-win-app: - needs: [cache-submodule] - runs-on: ubuntu-24.04 - - if: ${{ false }} # XXX: Flutter 3.24 --windows - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: DEBIAN_FRONTEND=noninteractive sudo -EH apt-get -y install mingw-w64 - - - run: debug=crossndk make -j3 -C app-windows ./env/dotdot/gui-orchid/.flutter-plugins - - run: debug=crossndk make -j3 -C app-windows target=win precache='--no-android --no-ios --windows -a' - - - uses: actions/upload-artifact@v4 - with: - name: orchid-win - path: app-windows/out-win/package - - - build-win-snd: - needs: [cache-submodule] - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: DEBIAN_FRONTEND=noninteractive sudo -EH apt-get -y install mingw-w64 - - - run: make -j3 -C eth-sender target=win - - - uses: actions/upload-artifact@v4 - with: - name: cj-win - path: eth-sender/out-win/x86_64/cj.exe - - - build-win-cli: - needs: [cache-submodule] - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: DEBIAN_FRONTEND=noninteractive sudo -EH apt-get -y install mingw-w64 - - - run: make -j3 -C cli-shared target=win - - - uses: actions/upload-artifact@v4 - with: - name: orchidcd-win - path: cli-shared/out-win/x86_64/orchidcd.exe - - - - build-win-srv: - needs: [cache-submodule] - runs-on: macos-13 - - if: ${{ false }} # XXX: use Hyper-V - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - uses: ./.github/actions/nerdctl - - run: brew install mingw-w64 coreutils - - - run: make -j3 -C srv-daemon target=win - - - uses: actions/upload-artifact@v4 - with: - name: orchidd-w64 - path: srv-daemon/out-win/x86_64/orchidd.exe - - - run: git status - - - - build-lnx-app: - needs: [cache-submodule] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: debug=crossndk make -j3 -C app-linux ./env/dotdot/gui-orchid/.flutter-plugins - - run: debug=crossndk make -j3 -C app-linux precache='--no-android --no-ios --linux' - - - uses: actions/upload-artifact@v4 - with: - name: orchid-lnx - path: app-linux/out-lnx/package - - - build-lnx-tst: - needs: [cache-submodule] - runs-on: ubuntu-latest - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: debug=crossndk make -j3 -C tst-network - - - build-lnx-cli: - needs: [cache-submodule] - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - machine: [x86_64, arm64, armhf] - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: debug=crossndk make -j3 -C cli-shared machine=${{ matrix.machine }} - - - uses: actions/upload-artifact@v4 - with: - name: orchidcd-lnx-${{ matrix.machine }} - path: cli-shared/out-lnx/${{ matrix.machine }}/orchidcd - - - build-lnx-srv: - needs: [cache-submodule] - runs-on: ubuntu-latest - - strategy: - fail-fast: false - matrix: - # XXX: armhf is missing rcrt1.o - machine: [x86_64, arm64] - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: env/setup-ndk.sh - - - run: debug=crossndk make -j3 -C srv-daemon machine=${{ matrix.machine }} - - - uses: actions/upload-artifact@v4 - with: - name: orchidd-lnx-${{ matrix.machine }} - path: srv-daemon/out-lnx/${{ matrix.machine }}/orchidd - if: ${{ matrix.machine != 'x86_64' }} - - - run: git status - - - build-lnx-dkr: - needs: [cache-submodule] - runs-on: ubuntu-latest - - steps: - - run: sudo rm -rf /opt - - - uses: actions/checkout@v4 - - run: env/setup-git.sh - - uses: ./.github/actions/submodule - - - run: cd srv-daemon && env/docker.sh -j3 - - build-lnx-bld: needs: [cache-submodule] runs-on: ubuntu-latest @@ -359,7 +42,9 @@ jobs: - uses: ./.github/actions/submodule - uses: ./.github/actions/nerdctl + - run: printenv - run: env/setup-ndk.sh + - run: printenv - run: gmake -j3 -C srv-daemon target=lnx @@ -369,17 +54,6 @@ jobs: path: srv-daemon/out-lnx/x86_64/orchidd - build-lnx-bad: - needs: [cache-submodule] - runs-on: ubuntu-24.04 - - steps: - - uses: actions/checkout@v4 - - run: env/setup.sh - - uses: ./.github/actions/submodule - - - run: make -j3 -C srv-daemon - build-lnx-all: needs: [build-lnx-mac, build-lnx-bld] diff --git a/env/revision.sh b/env/revision.sh index 8f52d3736..2d1d537a8 100755 --- a/env/revision.sh +++ b/env/revision.sh @@ -22,7 +22,9 @@ echo if [[ $# -eq 0 ]]; then echo; echo else - "$@" --version | head -n 1 + # Android NDK annotates version with their clang build-time flags + # (as in, the strategy used to optimize clang, not configuration) + "$@" --version | sed -e '1!d;s/, [+-][a-z]*//g' # ld64 doesn't support --version and prints its version to stderr # Android NDK uses inconsistent directories / urls for repository "$@" -Wl,-v 2>&1 | sed -e '1!d;s/([^ ]* /(/' || true diff --git a/env/setup-ndk.sh b/env/setup-ndk.sh index a917808fa..6dc301900 100755 --- a/env/setup-ndk.sh +++ b/env/setup-ndk.sh @@ -1,8 +1,17 @@ #!/bin/bash set -e set -o pipefail + +ndk=27.0.12077973 + echo y | "${ANDROID_HOME}"/cmdline-tools/latest/bin/sdkmanager \ "build-tools;30.0.3" \ - "ndk;27.0.12077973" \ + "ndk;${ndk}" \ "platforms;android-34" \ >/dev/null + +export ANDROID_NDK_ROOT="${ANDROID_HOME}/ndk/${ndk}" + +if [[ -n ${GITHUB_ENV} ]]; then + echo "ANDROID_NDK_ROOT=${ANDROID_NDK_ROOT}" >>"${GITHUB_ENV}" +fi