diff --git a/.github/workflows/build-fex.yml b/.github/workflows/build-fex.yml index deb099100..08d3ba957 100644 --- a/.github/workflows/build-fex.yml +++ b/.github/workflows/build-fex.yml @@ -29,11 +29,14 @@ jobs: persist-credentials: false - name: Build in Arch Linux ARM env: + GH_TOKEN: ${{ github.token }} FEX_EXTRA_CXXFLAGS: ${{ inputs.cxxflags }} FEX_THUNKS: ${{ inputs.thunks == 'true' && '1' || '0' }} run: | set -euo pipefail - docker run --rm -e FEX_EXTRA_CXXFLAGS="$FEX_EXTRA_CXXFLAGS" -e FEX_THUNKS="$FEX_THUNKS" -v "$PWD:/work" -w /work menci/archlinuxarm:base-devel bash tools/fex/build-in-arch.sh + FEX_VERSION=$(gh api repos/FEX-Emu/FEX/releases/latest --jq .tag_name) + echo "Building $FEX_VERSION, FEX's latest release" + docker run --rm -e FEX_VERSION="$FEX_VERSION" -e FEX_EXTRA_CXXFLAGS="$FEX_EXTRA_CXXFLAGS" -e FEX_THUNKS="$FEX_THUNKS" -v "$PWD:/work" -w /work menci/archlinuxarm:base-devel bash tools/fex/build-in-arch.sh sudo chown -R "$(id -u):$(id -g)" . - uses: actions/upload-artifact@v4 with: diff --git a/docs/development/x86-64-steam-client.md b/docs/development/x86-64-steam-client.md index 98d739dbd..d8845742b 100644 --- a/docs/development/x86-64-steam-client.md +++ b/docs/development/x86-64-steam-client.md @@ -204,13 +204,18 @@ alone would then read as an installed client. NullReferenceException, internal CLR errors). A writable mapping or mprotect now write-protects the overlapping part of any alias that is already executable, so the first write faults and invalidates. `FEX_SMCCHECKS=full` was the only workaround; no setting is needed with the patch. + - `0007-cmake-install-code-without-depends`: CMake 4.5 rejects the `DEPENDS` argument FEX passes to + `install(CODE ...)` for the guest thunk libraries, so builds with host thunks stopped at configure. + The guest libraries are external projects in the default build, which `install` already follows. - **Building and publishing.** Droid-Deck/DroidDeck-Components' `build-fex.yml` builds `tools/fex` from this repository at a chosen ref (default `main`) with host thunks, in the same Arch Linux ARM container with a read-only token, then a separate job replaces `fex.tzst` on Components' single `fex` release, checks the digest GitHub stored, and records the build's version, sha256 and size in its `fex.json` (in that order: a device that reads the old `fex.json` meanwhile gets a mismatching archive and keeps its FEX). This repository's `build-fex.yml` only builds `tools/fex` when it changes (and on dispatch, - for diagnostic builds such as `-DDEBUG_STRACE`); nothing is published from it. + for diagnostic builds such as `-DDEBUG_STRACE`); nothing is published from it. It builds FEX's latest + release, point releases (`FEX-2611.1`) included; `build-in-arch.sh` takes the tag from `FEX_VERSION` + and compares only its four-digit release against a patch's `Fixed-upstream`. - Releases so far: `fex-2609-r2` (no thunks), `fex-2609-r3` (thunks), `fex-2610-r1`, `fex-2610-r2`, `fex-2610-r3`, `fex-2610-r4` (in-root resolution when openat2 is missing, exact MAP_32BIT marking), `fex-2610-r5` (current: bundles libxxhash, which the Linux runtime does not ship; the diff --git a/tools/fex/build-in-arch.sh b/tools/fex/build-in-arch.sh index f8ca08d4a..dccb24f88 100755 --- a/tools/fex/build-in-arch.sh +++ b/tools/fex/build-in-arch.sh @@ -1,6 +1,8 @@ #!/usr/bin/bash set -euxo pipefail -VERSION=${FEX_VERSION:-FEX-2610} +VERSION=${FEX_VERSION:?FEX_VERSION must name a FEX release tag, e.g. FEX-2611.1} +RELEASE=${VERSION#FEX-} +RELEASE=${RELEASE%%.*} WORK=/work cd "$WORK" grep -q '^DisableSandbox' /etc/pacman.conf || sed -i 's/^\[options\]/[options]\nDisableSandbox/' /etc/pacman.conf @@ -38,7 +40,7 @@ fi rm -rf fex-src out && git clone -q --depth 1 --branch "$VERSION" --recurse-submodules --shallow-submodules https://github.com/FEX-Emu/FEX.git fex-src for p in tools/fex/patches/*.patch; do upstream=$(sed -n 's/^Fixed-upstream: FEX-\([0-9]\{4\}\)$/\1/p' "$p") - if [ -n "$upstream" ] && [ "${VERSION#FEX-}" -ge "$upstream" ]; then + if [ -n "$upstream" ] && [ "$RELEASE" -ge "$upstream" ]; then echo "$(basename "$p"): already in FEX-$upstream, skipped for $VERSION" continue fi diff --git a/tools/fex/patches/0007-cmake-install-code-without-depends.patch b/tools/fex/patches/0007-cmake-install-code-without-depends.patch new file mode 100644 index 000000000..6752b4028 --- /dev/null +++ b/tools/fex/patches/0007-cmake-install-code-without-depends.patch @@ -0,0 +1,20 @@ +diff --git a/CMakeLists.txt b/CMakeLists.txt +index 8976588..3ae54f4 100644 +--- a/CMakeLists.txt ++++ b/CMakeLists.txt +@@ -776,7 +776,6 @@ if (BUILD_THUNKS) + CODE " + execute_process(COMMAND ${CMAKE_COMMAND} --build . --target install + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest)" +- DEPENDS guest-libs + COMPONENT Runtime) + + install( +@@ -784,7 +783,6 @@ if (BUILD_THUNKS) + CODE " + execute_process(COMMAND ${CMAKE_COMMAND} --build . --target install + WORKING_DIRECTORY ${CMAKE_BINARY_DIR}/Guest_32)" +- DEPENDS guest-libs-32 + COMPONENT Runtime) + + add_custom_target(uninstall_guest-libs