The background thread that sampled CPU temperature and clock speed during a run relied on undocumented, OS-specific interfaces: raw AppleSMC keys on macOS, WMI ACPI thermal zones on Windows, and /sys/class/thermal or /sys/class/hwmon on Linux. Testing on Apple Silicon showed the SMC key scan can silently switch between different physical sensors mid-run, producing discontinuous jumps in reported temperature, and live per-core clock speed was never obtainable on macOS through any public API. Disable the feature entirely rather than ship unreliable data: drop the telemetry monitor thread, its platform-specific sensor backends, and the telemetry field from upload payloads. The pre-run background system-activity check (--no-system-check) is unrelated and untouched. Bump FB_VERSION to 0.4.2.
180 lines
6.4 KiB
YAML
180 lines
6.4 KiB
YAML
name: Build and release
|
|
|
|
on:
|
|
push:
|
|
tags:
|
|
- '**'
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test:
|
|
name: Test (${{ matrix.os }})
|
|
strategy:
|
|
matrix:
|
|
os:
|
|
- ubuntu-24.04
|
|
- macos-14
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Run kernel correctness tests
|
|
run: make test
|
|
|
|
build:
|
|
name: Build ${{ matrix.target }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
include:
|
|
- target: linux-amd64
|
|
os: ubuntu-24.04
|
|
- target: linux-i386
|
|
os: ubuntu-24.04
|
|
- target: linux-arm64
|
|
os: ubuntu-24.04-arm
|
|
- target: linux-ppc32be
|
|
os: ubuntu-24.04
|
|
- target: macos-amd64
|
|
os: macos-14
|
|
- target: macos-arm64
|
|
os: macos-14
|
|
- target: windows-amd64
|
|
os: ubuntu-24.04
|
|
- target: windows-i386
|
|
os: ubuntu-24.04
|
|
runs-on: ${{ matrix.os }}
|
|
steps:
|
|
- name: Check out source
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install the Linux i386 multilib compiler
|
|
if: matrix.target == 'linux-i386'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes gcc-multilib
|
|
|
|
- name: Install the Linux PPC32 big-endian cross-compiler
|
|
if: matrix.target == 'linux-ppc32be'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes gcc-powerpc-linux-gnu
|
|
|
|
- name: Install the Windows/AMD64 cross-compiler
|
|
if: matrix.target == 'windows-amd64'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes gcc-mingw-w64-x86-64
|
|
|
|
- name: Install the Windows/i386 cross-compiler
|
|
if: matrix.target == 'windows-i386'
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install --yes gcc-mingw-w64-i686
|
|
|
|
- name: Build Linux executable
|
|
if: startsWith(matrix.target, 'linux-')
|
|
run: |
|
|
make "${{ matrix.target }}"
|
|
file "dist/fossbench-${{ matrix.target }}"
|
|
if ! file "dist/fossbench-${{ matrix.target }}" | grep -q 'dynamically linked'; then
|
|
echo 'Linux release uses static glibc, which is unsafe with NSS-based DNS' >&2
|
|
exit 1
|
|
fi
|
|
if [ "${{ matrix.target }}" != linux-ppc32be ]; then
|
|
"dist/fossbench-${{ matrix.target }}" --help
|
|
fi
|
|
|
|
- name: Build macOS executable
|
|
if: startsWith(matrix.target, 'macos-')
|
|
env:
|
|
MACOSX_DEPLOYMENT_TARGET: ${{ matrix.target == 'macos-amd64' && '10.5' || '' }}
|
|
run: |
|
|
build_log="$(mktemp)"
|
|
if ! make "${{ matrix.target }}" >"$build_log" 2>&1; then
|
|
cat "$build_log"
|
|
{
|
|
echo '## macOS build failure'
|
|
echo '```text'
|
|
tail -80 "$build_log"
|
|
echo '```'
|
|
} >> "$GITHUB_STEP_SUMMARY"
|
|
exit 1
|
|
fi
|
|
cat "$build_log"
|
|
|
|
- name: Build Windows executable
|
|
if: startsWith(matrix.target, 'windows-')
|
|
run: |
|
|
make "${{ matrix.target }}"
|
|
file "dist/fossbench-${{ matrix.target }}.exe"
|
|
if [ "${{ matrix.target }}" = windows-i386 ]; then
|
|
pe="dist/fossbench-windows-i386.exe"
|
|
i686-w64-mingw32-objdump -p "$pe" > "$RUNNER_TEMP/windows-i386-pe.txt"
|
|
grep -Eq 'MajorSubsystemVersion[[:space:]]+5' "$RUNNER_TEMP/windows-i386-pe.txt"
|
|
grep -Eq 'MinorSubsystemVersion[[:space:]]+1' "$RUNNER_TEMP/windows-i386-pe.txt"
|
|
if grep -Eq 'GetTickCount64|InitializeCriticalSectionEx|CreateThreadpool|WaitOnAddress' "$RUNNER_TEMP/windows-i386-pe.txt"; then
|
|
echo 'Windows i386 release imports an API newer than Windows XP' >&2
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
- name: Package artifact
|
|
run: |
|
|
bin="fossbench-${{ matrix.target }}"
|
|
if [[ "${{ matrix.target }}" == windows-* ]]; then
|
|
bin="$bin.exe"
|
|
fi
|
|
if [[ "${{ matrix.target }}" == linux-* ]]; then
|
|
tar -czf "$GITHUB_WORKSPACE/fossbench-${{ matrix.target }}.tar.gz" \
|
|
-C "$GITHUB_WORKSPACE/dist" "$bin"
|
|
else
|
|
(cd "$GITHUB_WORKSPACE/dist" && zip -q "$GITHUB_WORKSPACE/fossbench-${{ matrix.target }}.zip" "$bin")
|
|
fi
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: fossbench-${{ matrix.target }}
|
|
path: fossbench-${{ matrix.target }}.*
|
|
if-no-files-found: error
|
|
|
|
release:
|
|
name: Create GitHub release
|
|
needs:
|
|
- test
|
|
- build
|
|
runs-on: ubuntu-24.04
|
|
permissions:
|
|
contents: write
|
|
steps:
|
|
- name: Download build artifacts
|
|
uses: actions/download-artifact@v4
|
|
with:
|
|
pattern: fossbench-*
|
|
path: release
|
|
merge-multiple: true
|
|
|
|
- name: Create checksums
|
|
working-directory: release
|
|
run: sha256sum fossbench-*.tar.gz fossbench-*.zip > SHA256SUMS
|
|
|
|
- name: Create release and attach artifacts
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
RELEASE_TAG: ${{ github.ref_name }}
|
|
run: |
|
|
gh release delete "$RELEASE_TAG" \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--yes 2>/dev/null || true
|
|
gh release create "$RELEASE_TAG" \
|
|
release/fossbench-*.tar.gz release/fossbench-*.zip \
|
|
release/SHA256SUMS \
|
|
--repo "$GITHUB_REPOSITORY" \
|
|
--title "Release $RELEASE_TAG" \
|
|
--notes "Removed CPU telemetry (background temperature and clock speed sampling during benchmark runs). It relied on undocumented, OS-specific interfaces (raw AppleSMC keys on macOS, WMI ACPI thermal zones on Windows, /sys/class/thermal and /sys/class/hwmon on Linux) that proved unstable and inconsistent across operating systems and hardware, and live per-core clock speed was never obtainable on macOS at all through any public API. Rather than ship telemetry data that can silently jump between physical sensors mid-run or simply not exist on a given platform, this release disables the feature entirely: fossbench.net no longer accepts or displays it, and the client no longer collects it. The one-time background system-activity check (CPU/memory/process sampling before a run) is unaffected and still available via --no-system-check." \
|
|
--generate-notes
|