mirror of
https://github.com/D-Modem/gui.git
synced 2026-11-28 22:30:49 -08:00
winport/CMakeLists.txt takes the architecture of libwinport from CMAKE_OSX_ARCHITECTURES (one architecture). CI builds the app on macOS for arm64 and x86_64, and the nightly release adds dmodem-win32-macos-x86_64.tar.gz. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B82eRVR36R8PgTTMQiuWkQ
120 lines
5.4 KiB
YAML
120 lines
5.4 KiB
YAML
# Nightly: the "nightly" pre-release of the apps, from the artifacts of
|
|
# the newest complete run of build.yml on main. It does not build the
|
|
# apps again. It runs each time a run of build.yml on main completes,
|
|
# and once a day. Each run updates the release in place and moves its
|
|
# tag: a run that fails does not delete the release. When main has no
|
|
# new commits, the run stops and the release does not change. A manual
|
|
# run (Actions > Nightly > Run workflow) can publish again with "force".
|
|
#
|
|
# The files are not signed: Windows SmartScreen and macOS Gatekeeper
|
|
# show a warning for them.
|
|
name: Nightly
|
|
|
|
on:
|
|
# (each change to main: when its build completes)
|
|
workflow_run:
|
|
workflows: [Build]
|
|
types: [completed]
|
|
branches: [main]
|
|
schedule:
|
|
- cron: "23 5 * * *"
|
|
workflow_dispatch:
|
|
inputs:
|
|
force:
|
|
description: Publish again, also when main has no new commits
|
|
type: boolean
|
|
default: false
|
|
|
|
# (one at a time: a second run waits for the first)
|
|
concurrency:
|
|
group: nightly
|
|
cancel-in-progress: false
|
|
|
|
permissions:
|
|
contents: write
|
|
actions: read
|
|
|
|
jobs:
|
|
nightly:
|
|
runs-on: ubuntu-24.04
|
|
timeout-minutes: 20
|
|
env:
|
|
GH_TOKEN: ${{ github.token }}
|
|
GH_REPO: ${{ github.repository }}
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- name: The newest build of main
|
|
id: pick
|
|
run: .github/scripts/nightly-pick.sh build.yml
|
|
env:
|
|
FORCE: ${{ inputs.force || 'false' }}
|
|
|
|
- uses: actions/download-artifact@v4
|
|
if: steps.pick.outputs.skip == 'false'
|
|
with:
|
|
run-id: ${{ steps.pick.outputs.run_build_yml }}
|
|
github-token: ${{ github.token }}
|
|
path: dl
|
|
|
|
- name: Files
|
|
if: steps.pick.outputs.skip == 'false'
|
|
env:
|
|
SHA: ${{ steps.pick.outputs.sha }}
|
|
RUN: ${{ steps.pick.outputs.run_build_yml }}
|
|
run: |
|
|
mkdir out
|
|
take() { # take ARTIFACT FILE [NAME]: copy it if the build made it
|
|
if [ -f "dl/$1/$2" ]; then cp "dl/$1/$2" "out/${3:-$2}"; else echo "- \`${3:-$2}\`" >> missing; fi
|
|
}
|
|
take dmodem-windows-9x dmodem.exe dmodem-win9x.exe
|
|
take dmodem-windows-98 dmodem.exe dmodem-win98.exe
|
|
take dmodem-windows dmodem.exe dmodem-win7.exe
|
|
take dmodem-linux dmodem-gui-linux-x86_64.tar.gz
|
|
take dmodem-macos D-Modem-macos.zip
|
|
take dmodem-win32-linux dmodem-win32-linux-x86_64.tar.gz
|
|
take dmodem-win32-macos dmodem-win32-macos-arm64.tar.gz
|
|
take dmodem-win32-macos-x86_64 dmodem-win32-macos-x86_64.tar.gz
|
|
(cd out && sha256sum * > SHA256SUMS)
|
|
ls -l out
|
|
{
|
|
echo "The newest build of \`main\`, from commit $SHA ([build run]($GITHUB_SERVER_URL/$GH_REPO/actions/runs/$RUN))."
|
|
echo "This is not a stable release. The files are not signed."
|
|
echo
|
|
echo "| File | What it is |"
|
|
echo "| --- | --- |"
|
|
echo "| \`dmodem-win9x.exe\` | The Windows app with the modem built in, for Windows 95, 98, ME, NT 4.0 and later (no C runtime DLL; Windows 95 needs Winsock 2) |"
|
|
echo "| \`dmodem-win98.exe\` | The Windows app with the modem built in, for Windows 98 SE, ME, 2000 and later (on msvcrt.dll) |"
|
|
echo "| \`dmodem-win7.exe\` | The Windows app for Windows 7 and later, with the modem built in |"
|
|
echo "| \`dmodem-gui-linux-x86_64.tar.gz\` | The Linux app (GTK 4), x86_64. It needs GTK 4, libadwaita, PulseAudio and libsndfile. Its files are in \`usr/\`: extract it into \`/\`, for example with \`sudo tar -xzf dmodem-gui-linux-x86_64.tar.gz -C /\` |"
|
|
echo "| \`D-Modem-macos.zip\` | The macOS app (SwiftUI) with the modem built in, arm64 and x86_64, macOS 13 and later. Not notarized: right-click the app and select Open |"
|
|
echo "| \`dmodem-win32-linux-x86_64.tar.gz\` | The Windows app on Linux (X11) with the modem built in, x86_64 |"
|
|
echo "| \`dmodem-win32-macos-arm64.tar.gz\` | The Windows app on macOS with the modem built in, arm64 (Apple silicon) |"
|
|
echo "| \`dmodem-win32-macos-x86_64.tar.gz\` | The Windows app on macOS with the modem built in, x86_64 (Intel Mac) |"
|
|
echo "| \`SHA256SUMS\` | The SHA-256 of each file |"
|
|
if [ -f missing ]; then
|
|
echo
|
|
echo "This build did not make these files:"
|
|
cat missing
|
|
fi
|
|
} > notes.md
|
|
|
|
# The step uses the DMODEM_BUMP_TOKEN organization secret
|
|
# (Contents: read and write on D-Modem/gui, refer to
|
|
# d-modem-bump.yml) if it is available. If that token fails (for
|
|
# example "HTTP 403: Resource not accessible by personal access
|
|
# token"), the next step tries again with the GITHUB_TOKEN of this
|
|
# workflow. The script updates the release in place, so a failed
|
|
# try does not delete it.
|
|
- name: Publish
|
|
id: publish
|
|
if: steps.pick.outputs.skip == 'false' && env.HAS_BUMP_TOKEN == 'true'
|
|
continue-on-error: true
|
|
env:
|
|
HAS_BUMP_TOKEN: ${{ secrets.DMODEM_BUMP_TOKEN != '' }}
|
|
GH_TOKEN: ${{ secrets.DMODEM_BUMP_TOKEN }}
|
|
run: .github/scripts/nightly-publish.sh "${{ steps.pick.outputs.sha }}" notes.md out
|
|
- name: Publish (GITHUB_TOKEN)
|
|
if: steps.pick.outputs.skip == 'false' && steps.publish.outcome != 'success'
|
|
run: .github/scripts/nightly-publish.sh "${{ steps.pick.outputs.sha }}" notes.md out
|