Skip to content

Free fork of NotProton: Windows Steam games in Mac Steam, on CodeWeavers' Wine and Apple's Game Porting Toolkit

build: pin the floating inputs

raymondchins395dd4ca9383
diff --git a/.github/workflows/app.yml b/.github/workflows/app.yml
index e39336b..ac4d17c 100644
--- a/.github/workflows/app.yml
+++ b/.github/workflows/app.yml
@@ -19,7 +19,7 @@ jobs:
runs-on: xcode-27
timeout-minutes: 30
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
- name: Record the toolchain
run: |
@@ -38,7 +38,7 @@ jobs:
- name: Restore Dobby build cache
id: dobby-cache
- uses: actions/cache@v4
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: build/dobby
key: dobby-xcode-27-${{ env.DOBBY_COMMIT }}-${{ runner.arch }}
@@ -49,7 +49,7 @@ jobs:
- name: Restore the Wine trees
id: wine-cache
- uses: actions/cache/restore@v4
+ uses: actions/cache/restore@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
scratch/wine
@@ -58,7 +58,7 @@ jobs:
key: wine-xcode-27-${{ hashFiles('bridge/setup-wine-tree.sh', 'bridge/register-components.diff') }}
- name: Restore Proton tarball cache
- uses: actions/cache@v4
+ uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: scratch/proton-lsc
key: proton-tarball-${{ hashFiles('lsteamclient/fetch.sh') }}
@@ -77,7 +77,7 @@ jobs:
- name: Save the Wine trees
if: steps.wine-cache.outputs.cache-hit != 'true'
- uses: actions/cache/save@v4
+ uses: actions/cache/save@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: |
scratch/wine
@@ -111,7 +111,7 @@ jobs:
ditto -c -k --keepParent out/Bridgeplay.app out/artifact/Bridgeplay.zip
- name: Upload the app bundle
- uses: actions/upload-artifact@v4
+ uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
with:
name: Bridgeplay
path: out/artifact
diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml
index 6881f50..b5e8772 100644
--- a/.github/workflows/lint.yml
+++ b/.github/workflows/lint.yml
@@ -11,13 +11,15 @@ permissions:
env:
SHELLCHECK_VERSION: "0.11.0"
+ # GitHub's recorded digest of shellcheck-v0.11.0.linux.x86_64.tar.xz
+ SHELLCHECK_SHA256: "8c3be12b05d5c177a04c29e3c78ce89ac86f1595681cab149b65b97c4e227198"
jobs:
scripts:
name: shell scripts
runs-on: ubuntu-latest
steps:
- - uses: actions/checkout@v4
+ - uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
# scriptcheck resolves its file list through git ls-files
- name: Confirm a git checkout
@@ -29,7 +31,9 @@ jobs:
- name: Install the pinned shellcheck
run: |
url=https://github.com/koalaman/shellcheck/releases/download/v$SHELLCHECK_VERSION/shellcheck-v$SHELLCHECK_VERSION.linux.x86_64.tar.xz
- curl -fsSL "$url" | tar xJ -C "$RUNNER_TEMP"
+ curl -fsSL -o "$RUNNER_TEMP/shellcheck.tar.xz" "$url"
+ echo "$SHELLCHECK_SHA256 $RUNNER_TEMP/shellcheck.tar.xz" | sha256sum -c -
+ tar xJf "$RUNNER_TEMP/shellcheck.tar.xz" -C "$RUNNER_TEMP"
sudo install "$RUNNER_TEMP/shellcheck-v$SHELLCHECK_VERSION/shellcheck" /usr/local/bin/shellcheck
# Both lint targets skip when shellcheck is missing, which would report
diff --git a/scripts/build-dxmt.sh b/scripts/build-dxmt.sh
index fa3a8ac..c0bda57 100755
--- a/scripts/build-dxmt.sh
+++ b/scripts/build-dxmt.sh
@@ -26,6 +26,15 @@ if [ $# -ne 1 ]; then
exit 2
fi
COMMIT_ARG="$1"
+# A commit, never a branch or tag that can move: 7 to 40 hex digits, checked below to be
+# a prefix of what it resolves to.
+case "$COMMIT_ARG" in
+ *[!0-9a-f]*) echo "$0: $COMMIT_ARG is not a commit SHA (lowercase hex)" >&2; exit 2 ;;
+esac
+if [ "${#COMMIT_ARG}" -lt 7 ] || [ "${#COMMIT_ARG}" -gt 40 ]; then
+ echo "$0: $COMMIT_ARG is not a commit SHA (7 to 40 hex digits)" >&2
+ exit 2
+fi
here="$(cd "$(dirname "$0")" && pwd)"
repo="$(cd "$here/.." && pwd)"
@@ -48,6 +57,7 @@ GCENX_SHA256="3f8e89a4874953a69e7be3dcdcc262d0346e462a9374bd116770fffb9e2a99d2"
GCENX_UNIX="Wine Devel.app/Contents/Resources/wine/lib/wine/x86_64-unix"
# ci.yml: "pip3 install meson==1.10.0".
MESON_VERSION="1.10.0"
+NINJA_VERSION="1.13.0"
# The bison macOS ships is too old for wine's configure.
export PATH="$WORK/venv/bin:/opt/homebrew/bin:/opt/homebrew/opt/bison/bin:$PATH"
@@ -80,10 +90,11 @@ mkdir -p "$WORK" "$OUT"
start=$(date +%s)
# --- meson + ninja, the versions CI uses ------------------------------------------------
-if [ "$("$WORK/venv/bin/meson" --version 2>/dev/null || true)" != "$MESON_VERSION" ]; then
- log "creating python venv with meson $MESON_VERSION"
+if [ "$("$WORK/venv/bin/meson" --version 2>/dev/null || true)" != "$MESON_VERSION" ] \
+ || [ "$("$WORK/venv/bin/ninja" --version 2>/dev/null || true)" != "$NINJA_VERSION" ]; then
+ log "creating python venv with meson $MESON_VERSION and ninja $NINJA_VERSION"
python3 -m venv "$WORK/venv"
- "$WORK/venv/bin/pip" install --quiet "meson==$MESON_VERSION" ninja
+ "$WORK/venv/bin/pip" install --quiet "meson==$MESON_VERSION" "ninja==$NINJA_VERSION"
fi
# --- DXMT source -----------------------------------------------------------------------
@@ -96,6 +107,7 @@ if ! git -C "$SRC" cat-file -e "$COMMIT_ARG^{commit}" 2>/dev/null; then
git -C "$SRC" fetch --quiet origin
fi
COMMIT="$(git -C "$SRC" rev-parse --verify "$COMMIT_ARG^{commit}")"
+case "$COMMIT" in "$COMMIT_ARG"*) ;; *) die "$COMMIT_ARG resolved to $COMMIT, a ref rather than that commit" ;; esac
SHORT="$(git -C "$SRC" rev-parse --short=7 "$COMMIT")"
git -C "$SRC" -c advice.detachedHead=false checkout --quiet --detach "$COMMIT"
git -C "$SRC" submodule update --quiet --init --recursive
diff --git a/scripts/update-gamecontrollerdb.sh b/scripts/update-gamecontrollerdb.sh
index 92d1576..067db67 100755
--- a/scripts/update-gamecontrollerdb.sh
+++ b/scripts/update-gamecontrollerdb.sh
@@ -15,7 +15,10 @@
set -eu
-db_url=https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/master/gamecontrollerdb.txt
+# A pinned commit, not master: a regenerated file changes only when this line does.
+# To move it: gh api repos/mdqinc/SDL_GameControllerDB/commits/master -q .sha
+db_commit=ff333823a85ae896e73f4c53670932cf0f728adb
+db_url=https://raw.githubusercontent.com/mdqinc/SDL_GameControllerDB/$db_commit/gamecontrollerdb.txt
own="$HOME/Library/Application Support/bridgeplay/gamecontrollerdb.txt"
# Before the app's 3.0.0 migration the file is still in the old support folder.
legacy_own="$HOME/Library/Application Support/notproton/gamecontrollerdb.txt"