Something went wrong. Try again.
This repository has no description
Something went wrong. Try again.
10 kB · 293 lines
YAML
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294name: build
on: pull_request: push: branches: - next
concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true
jobs: linux: name: ${{ matrix.name }} runs-on: ubuntu-latest strategy: matrix: include: - name: linux-amd64 cmd: >- make linux-amd64 && make test-vod && make static-test && make check && make ci-lexicons - name: linux-arm64 cmd: "make linux-arm64" - name: windows-amd64 cmd: "make windows-amd64 && make desktop-windows-amd64" # The e2e build of the release APK (see `make android-e2e`), which # android-e2e runs. Shipped releases are built by GitLab. - name: android cmd: "make app && make android-e2e" # The Playwright web suite (js/e2e-web), OAuth flow included. The # harness binds 443 inside the container and needs the public # localhost-* DNS records; see pkg/cmd/e2e_https.go. - name: e2e-web cmd: "bash hack/provision.sh" steps: - name: Maximize build space run: | sudo rm -rf /usr/share/dotnet /usr/local/lib/android /opt/ghc /opt/hostedtoolcache/CodeQL
- name: Check out code uses: actions/checkout@v4.1.7 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }}
- name: mise check if: matrix.name == 'linux-amd64' uses: jdx/mise-action@v2 with: install: true
- name: Log in to the Container registry uses: docker/login-action@v2 with: registry: ghcr.io username: ${{ github.actor }} password: ${{ github.token }}
- name: make node run: | sudo apt install podman -y # Ubuntu 24.04's crun (1.14.1) rejects the OCI spec version newer # podman emits ("unknown version specified", fixed in crun >= 1.14.3), # and the 20260726 runner image update made that pairing fatal. sudo curl -fsSL -o /usr/bin/crun https://github.com/containers/crun/releases/download/1.28/crun-1.28-linux-amd64 sudo chmod +x /usr/bin/crun make in-container BUILDER_TARGET=builder-no-darwin DOCKER_PWD_MOUNT_PATH=/app DOCKER_BUILD_OPTS="--layers --cache-to ghcr.io/streamplace/streamplace --cache-from ghcr.io/streamplace/streamplace" DOCKER_OPTS="-e STREAMPLACE_IGNORE_LEAKS=true -e STREAMPLACE_TEST_COUNT=1 -e CI=true -e GITHUB_ACTION=true" IN_CONTAINER_CMD="${{ matrix.cmd }}"
- name: Publish Test Report if: matrix.name == 'linux-amd64' && (success() || failure()) uses: mikepenz/action-junit-report@v5 with: report_paths: "test.xml"
- name: Upload streamplace binary if: matrix.name == 'linux-amd64' uses: actions/upload-artifact@v4 with: name: streamplace-linux-amd64-${{ github.run_id }} path: ./build-linux-amd64/streamplace retention-days: 1
- name: Upload android e2e APK if: matrix.name == 'android' uses: actions/upload-artifact@v4 with: name: android-e2e-apk-${{ github.run_id }} path: ./bin/*-android-e2e.apk retention-days: 1
- name: Upload e2e-web artifacts if: matrix.name == 'e2e-web' && failure() uses: actions/upload-artifact@v4 with: name: e2e-web-${{ github.event.pull_request.head.sha || github.sha }} path: | js/e2e-web/test-results/ js/e2e-web/playwright-report/ retention-days: 7
- name: Upload bin artifacts if: matrix.name == 'windows-amd64' uses: actions/upload-artifact@v4 with: name: windows-bin-${{ github.event.pull_request.head.sha }} path: ./bin/ retention-days: 1
# The Maestro suite (.maestro/) on an Android emulator, OAuth login included: # hack/e2e-local.sh against the linux-amd64 binary and the android job's # e2e APK. The harness runs on the runner, not in the builder container, # so the emulator can reach it. android-e2e: name: android-e2e runs-on: ubuntu-latest timeout-minutes: 60 needs: linux steps: # full history: pnpm install's prepare steps derive the version from it - uses: actions/checkout@v4.1.7 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4 with: node-version: 22
# the harness runs js/dev-env (a local PDS and PLC) with node - name: install dependencies run: npm install -g corepack@latest && corepack enable && pnpm install
- name: download streamplace binary uses: actions/download-artifact@v4 with: name: streamplace-linux-amd64-${{ github.run_id }} path: ./build-linux-amd64
- name: download android e2e APK uses: actions/download-artifact@v4 with: name: android-e2e-apk-${{ github.run_id }} path: ./bin
- name: prepare the runner run: | chmod +x ./build-linux-amd64/streamplace # the harness serves the OAuth hosts on 127.0.0.1:443 sudo sysctl -w net.ipv4.ip_unprivileged_port_start=443 echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules sudo udevadm control --reload-rules sudo udevadm trigger --name-match=kvm # a pinned release, checked before anything in it runs curl -fsSL -o /tmp/maestro.zip https://github.com/mobile-dev-inc/maestro/releases/download/cli-2.6.1/maestro.zip echo "3440825f514f537c6a96bcf5de995780c2a4a7f83a43208fdc95d4f1fecfad3b /tmp/maestro.zip" | sha256sum -c - unzip -q /tmp/maestro.zip -d "$HOME/.maestro-dist" echo "$HOME/.maestro-dist/maestro/bin" >> $GITHUB_PATH
- uses: actions/cache@v4 id: avd-cache with: path: | ~/.android/avd/* ~/.android/adb* key: avd-pixel-6-api-34-google-apis-v1
# A Google APIs image, not Play Store: hack/e2e-local.sh needs root to # point the emulator at the harness and install its CA. - name: create avd snapshot if: steps.avd-cache.outputs.cache-hit != 'true' uses: reactivecircus/android-emulator-runner@v2 with: api-level: 34 target: google_apis arch: x86_64 profile: pixel_6 force-avd-creation: false emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true script: echo "avd snapshot created"
- name: run maestro flows uses: reactivecircus/android-emulator-runner@v2 with: api-level: 34 target: google_apis arch: x86_64 profile: pixel_6 force-avd-creation: false # more cores/RAM so the software-rendered emulator doesn't thrash # and ANR the launcher out from under the app mid-test cores: 4 ram-size: 6144M heap-size: 576M emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none disable-animations: true # one line: the action runs each script line in its own shell script: E2E_HARNESS_LOG=$PWD/.maestro/artifacts/harness.log bash hack/e2e-local.sh android
- name: upload maestro artifacts if: always() uses: actions/upload-artifact@v4 with: name: maestro-android-${{ github.run_id }} path: | .maestro/artifacts/ ~/.maestro/tests/ retention-days: 7 if-no-files-found: warn
# windows-selftest: # name: windows-selftest # runs-on: windows-latest # needs: linux # steps: # - name: Download bin artifacts # uses: actions/download-artifact@v4 # with: # name: windows-bin-${{ github.event.pull_request.head.sha }} # path: ./bin/
# - name: Run Windows executable # shell: bash # run: | # set -euo pipefail # set -x AQD_NO_UPDATE=true # set -x STREAMPLACE_TEST_SERIES=true # echo "running $PWD/bin/*.exe" # ./bin/*.exe # powershell -Command "Stop-Process -Name Streamplace" # cd "$LOCALAPPDATA/streamplace_desktop" # cd app-* # ./Streamplace.exe -- --self-test
darwin: name: ${{ matrix.name }} runs-on: ${{ matrix.runs-on }} strategy: matrix: include: - name: darwin-arm64 runs-on: macos-15 cmd: make && make test && make check xcode-version: "16.4" - name: ios runs-on: macos-26 cmd: make ios xcode-version: "26.3" - name: darwin-amd64 runs-on: macos-15-intel cmd: make xcode-version: "16.4" steps: - name: Check out code uses: actions/checkout@v4.1.7 with: fetch-depth: 0 ref: ${{ github.event.pull_request.head.sha }}
- uses: actions/setup-node@v4 with: node-version: 22
- uses: maxim-lobanov/setup-xcode@v1 with: xcode-version: ${{ matrix.xcode-version }}
- name: Build Streamplace env: STREAMPLACE_TEST_COUNT: "1" STREAMPLACE_IGNORE_LEAKS: "true" NODE_OPTIONS: "--max_old_space_size=4096" run: | npm install -g corepack@latest \ && corepack enable \ && export GOTOOLCHAIN=go1.26.5 \ && brew install go llvm \ && rustup target add wasm32-wasip1 \ && rustup target add wasm32-unknown-unknown \ && python -m pip install virtualenv \ && python -m virtualenv ~/venv \ && source ~/venv/bin/activate \ && python -m pip install meson \ && PATH="/opt/homebrew/opt/llvm/bin:$PATH" \ && ${{ matrix.cmd }}