4
0

release-linux.yml 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313
  1. # One-off fallback (round 190qd, the 0.1.31 release): builds the Linux files of an existing release tag (x86_64
  2. # AppImage / tar.gz, arm64 AppImage / tar.gz, the Linux plugin pack) with the jobs of release.yml, linux-arm64.yml
  3. # and plugins.yml (copied, checkout at the tag) and attaches them, updating SHA256SUMS.txt and the plugin pack's
  4. # SHA256SUMS. Written when Launchpad's PPA failed the release run's Linux jobs; release.yml now retries apt.
  5. name: Release Linux files
  6. 'on':
  7. workflow_dispatch:
  8. inputs:
  9. tag:
  10. description: release tag (v...) whose Linux files are built from the tag and attached
  11. type: string
  12. required: true
  13. permissions:
  14. contents: read
  15. env:
  16. ZIG_VERSION: 0.14.1
  17. ZIG_SHA256: 24aeeec8af16c381934a6cd7d95c807a8cb2cf7df9fa40d359aa884195c4716c
  18. JUCE_VERSION: 8.0.4
  19. JUCE_SHA256: 0effe9823a6fd8a4f98e5c08be7d308350e417b2d15dcf34011e778fefbbf005
  20. PLUGINVAL_VERSION: v1.0.4
  21. LV2LINT_COMMIT: 9661902c922650de99bd68e69ee0380d299aed3e
  22. CLAP_VALIDATOR: https://github.com/free-audio/clap-validator/releases/download/0.4.1/clap-validator-0.4.1-127-g152b982
  23. jobs:
  24. version:
  25. name: Version
  26. runs-on: ubuntu-24.04
  27. outputs:
  28. label: ${{ steps.v.outputs.label }}
  29. steps:
  30. - name: Label
  31. id: v
  32. shell: bash
  33. env:
  34. TAG: ${{ inputs.tag }}
  35. run: '[[ "$TAG" == v* ]] || { echo "::error::a release tag (v...) is required"; exit 1; }
  36. echo "label=${TAG#v}" >> "$GITHUB_OUTPUT"
  37. '
  38. linux:
  39. name: Linux (AppImage, tar.gz)
  40. needs: version
  41. runs-on: ubuntu-24.04
  42. container:
  43. image: ubuntu:22.04
  44. options: --cap-add=SYS_ADMIN
  45. env:
  46. LABEL: ${{ needs.version.outputs.label }}
  47. DEBIAN_FRONTEND: noninteractive
  48. MAX_GLIBC: '2.35'
  49. steps:
  50. - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
  51. run: "# (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries\necho 'Acquire::Retries \"\
  52. 30\";' > /etc/apt/apt.conf.d/80-lynx-retries\napt-get update -q\napt-get install -y -q --no-install-recommends ca-certificates curl git\
  53. \ gnupg software-properties-common\nadd-apt-repository -y ppa:ubuntu-toolchain-r/test\napt-get update -q\napt-get install -y -q gcc-13\
  54. \ g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils \\\n fonts-dejavu-core libasound2-dev libjack-jackd2-dev libx11-dev\
  55. \ libxrandr-dev libxinerama-dev \\\n libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev desktop-file-utils\
  56. \ zsync\nldd --version | head -1\ng++-13 --version | head -1\n"
  57. - uses: actions/checkout@v5
  58. with:
  59. ref: ${{ inputs.tag }}
  60. - name: JUCE (checksum verified)
  61. run: 'git config --global --add safe.directory "$GITHUB_WORKSPACE"
  62. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  63. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  64. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  65. '
  66. - name: Build
  67. run: "cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE=\"$RUNNER_TEMP/juce\" \\\n -DCMAKE_C_COMPILER=gcc-13\
  68. \ -DCMAKE_CXX_COMPILER=g++-13\ncmake --build build --target LYNX -- -k 0\nsha256sum build/LYNX_artefacts/Release/LYNX\n"
  69. - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
  70. run: ./scripts/check-linux-compat.sh build/LYNX_artefacts/Release/LYNX "$MAX_GLIBC"
  71. - name: Self-test and demo project
  72. run: 'bin=build/LYNX_artefacts/Release/LYNX
  73. xvfb-run -a "$bin" --selftest "$PWD/selftest.txt" "$PWD/selftest-demo.lynx" || true
  74. cat selftest.txt
  75. grep -q ''^result=OK'' selftest.txt
  76. xvfb-run -a "$bin" --opentest "$PWD/opentest.txt" || true
  77. tail -3 opentest.txt; grep -E ''FAIL|HANG'' opentest.txt || true
  78. grep -q ''^result=OK'' opentest.txt
  79. xvfb-run -a "$bin" --showcase "$PWD/Demo.lynx" || true
  80. test -s Demo.lynx
  81. '
  82. - name: Package
  83. run: ./scripts/package-linux.sh build/LYNX_artefacts/Release/LYNX "$LABEL" dist Demo.lynx
  84. - name: AppImage starts offline and shows its window
  85. run: REQUIRE_OFFLINE=1 ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-x86_64.AppImage"
  86. - name: AppImage starts on a system without fonts
  87. run: FONTS=none ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-x86_64.AppImage"
  88. - name: Upload package
  89. uses: actions/upload-artifact@v7
  90. with:
  91. name: LYNX-${{ env.LABEL }}-linux-x86_64
  92. path: dist/*
  93. if-no-files-found: error
  94. linux-arm64:
  95. name: Linux arm64 (AppImage, tar.gz)
  96. needs: version
  97. runs-on: ubuntu-24.04-arm
  98. timeout-minutes: 180
  99. container:
  100. image: ubuntu:22.04
  101. options: --cap-add=SYS_ADMIN
  102. env:
  103. LABEL: ${{ needs.version.outputs.label }}
  104. DEBIAN_FRONTEND: noninteractive
  105. MAX_GLIBC: '2.35'
  106. ARCH: aarch64
  107. steps:
  108. - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
  109. run: "uname -m\n# (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries\necho 'Acquire::Retries\
  110. \ \"30\";' > /etc/apt/apt.conf.d/80-lynx-retries\napt-get update -q\napt-get install -y -q --no-install-recommends ca-certificates curl\
  111. \ git gnupg software-properties-common\nadd-apt-repository -y ppa:ubuntu-toolchain-r/test\napt-get update -q\napt-get install -y -q gcc-13\
  112. \ g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils python3 \\\n fonts-dejavu-core libasound2-dev libjack-jackd2-dev\
  113. \ libx11-dev libxrandr-dev libxinerama-dev \\\n libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev\
  114. \ desktop-file-utils zsync\nldd --version | head -1\ng++-13 --version | head -1\n"
  115. - uses: actions/checkout@v5
  116. with:
  117. ref: ${{ inputs.tag }}
  118. - name: JUCE (checksum verified)
  119. run: 'git config --global --add safe.directory "$GITHUB_WORKSPACE"
  120. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  121. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  122. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  123. '
  124. - name: Build
  125. run: "cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE=\"$RUNNER_TEMP/juce\" \\\n -DCMAKE_C_COMPILER=gcc-13\
  126. \ -DCMAKE_CXX_COMPILER=g++-13\ncmake --build build --target LYNX -- -k 0 -j3\nfile build/LYNX_artefacts/Release/LYNX\nsha256sum build/LYNX_artefacts/Release/LYNX\n"
  127. - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
  128. run: ./scripts/check-linux-compat.sh build/LYNX_artefacts/Release/LYNX "$MAX_GLIBC"
  129. - name: Self-test and demo project
  130. run: 'bin=build/LYNX_artefacts/Release/LYNX
  131. xvfb-run -a "$bin" --selftest "$PWD/selftest.txt" "$PWD/selftest-demo.lynx" || true
  132. cat selftest.txt
  133. grep -q ''^result=OK'' selftest.txt
  134. xvfb-run -a "$bin" --opentest "$PWD/opentest.txt" || true
  135. tail -3 opentest.txt; grep -E ''FAIL|HANG'' opentest.txt || true
  136. grep -q ''^result=OK'' opentest.txt
  137. xvfb-run -a "$bin" --showcase "$PWD/Demo.lynx" || true
  138. test -s Demo.lynx
  139. '
  140. - name: Package
  141. run: ./scripts/package-linux.sh build/LYNX_artefacts/Release/LYNX "$LABEL" dist Demo.lynx
  142. - name: AppImage starts offline and shows its window
  143. run: REQUIRE_OFFLINE=1 ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-aarch64.AppImage" 20
  144. - name: AppImage starts on a system without fonts
  145. run: FONTS=none ./scripts/check-appimage-start.sh "dist/LYNX-$LABEL-aarch64.AppImage" 20
  146. - name: Upload package
  147. uses: actions/upload-artifact@v7
  148. with:
  149. name: LYNX-${{ env.LABEL }}-linux-aarch64
  150. path: dist/*
  151. if-no-files-found: error
  152. - name: Upload the self-test reports
  153. if: always()
  154. uses: actions/upload-artifact@v7
  155. with:
  156. name: arm64-selftest-${{ env.LABEL }}
  157. path: 'selftest.txt
  158. opentest.txt
  159. opentest-hang/*
  160. '
  161. retention-days: 14
  162. if-no-files-found: ignore
  163. plugins-linux:
  164. name: Linux x86_64
  165. needs: version
  166. runs-on: ubuntu-24.04
  167. container:
  168. image: ubuntu:22.04
  169. env:
  170. LABEL: ${{ needs.version.outputs.label }}
  171. DEBIAN_FRONTEND: noninteractive
  172. MAX_GLIBC: '2.35'
  173. steps:
  174. - name: Build dependencies (Ubuntu 22.04 + GCC 13 from ppa:ubuntu-toolchain-r/test)
  175. run: "# (round 190qd) Launchpad's PPA answered 503 on half the requests during the 0.1.31 release: apt retries\necho 'Acquire::Retries \"\
  176. 30\";' > /etc/apt/apt.conf.d/80-lynx-retries\napt-get update -q\napt-get install -y -q --no-install-recommends ca-certificates curl git\
  177. \ gnupg software-properties-common\nadd-apt-repository -y ppa:ubuntu-toolchain-r/test\napt-get update -q\napt-get install -y -q gcc-13\
  178. \ g++-13 cmake ninja-build pkg-config file binutils xvfb xauth x11-utils unzip xz-utils \\\n fonts-dejavu-core libasound2-dev libjack-jackd2-dev\
  179. \ libx11-dev libxrandr-dev libxinerama-dev \\\n libxcursor-dev libxext-dev libxcomposite-dev libfreetype-dev libfontconfig1-dev libgl-dev\
  180. \ libcurl4 \\\n lv2-dev liblilv-dev libxxhash-dev python3-pip\n"
  181. - uses: actions/checkout@v5
  182. with:
  183. ref: ${{ inputs.tag }}
  184. - name: JUCE (checksum verified)
  185. run: 'git config --global --add safe.directory "$GITHUB_WORKSPACE"
  186. curl -fsSL -o juce.tar.gz "https://github.com/juce-framework/JUCE/archive/refs/tags/$JUCE_VERSION.tar.gz"
  187. echo "$JUCE_SHA256 juce.tar.gz" | sha256sum -c -
  188. mkdir -p "$RUNNER_TEMP/juce" && tar xzf juce.tar.gz -C "$RUNNER_TEMP/juce" --strip-components 1 && rm juce.tar.gz
  189. '
  190. - name: Build
  191. run: "cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release -DFETCHCONTENT_SOURCE_DIR_JUCE=\"$RUNNER_TEMP/juce\" \\\n -DCMAKE_C_COMPILER=gcc-13\
  192. \ -DCMAKE_CXX_COMPILER=g++-13 -DLYNX_BUILD_PLUGINS=ON -DLYNX_LTO=OFF\ncmake --build build --target lynx_plugins -- -k 0\n"
  193. - name: Package
  194. run: ./scripts/package-plugins.sh linux build/plugins "$LABEL" dist
  195. - name: Runs on glibc ${{ env.MAX_GLIBC }} without the system's libstdc++
  196. run: 'mkdir pkg && tar xJf "dist/LYNX-Plugins-$LABEL-linux-x86_64.tar.xz" -C pkg
  197. find pkg -type f \( -name ''*.so'' -o -name ''*.clap'' \) -print0 | xargs -0 -n1 ./scripts/check-linux-compat.sh
  198. '
  199. - name: lv2lint
  200. run: "pip3 install -q meson\ngit clone -q https://git.open-music-kontrollers.ch/~hp/lv2lint \"$RUNNER_TEMP/lv2lint-src\"\ngit -C \"$RUNNER_TEMP/lv2lint-src\"\
  201. \ checkout -q \"$LV2LINT_COMMIT\"\ncd \"$RUNNER_TEMP/lv2lint-src\"\nCC=gcc-13 meson setup build -Dbuild-tests=false -Donline-tests=disabled\
  202. \ -Delf-tests=disabled -Dx11-tests=disabled \\\n -Db_lto=false --prefix=\"$RUNNER_TEMP/lv2lint\"\nmeson install -C build\n\"$RUNNER_TEMP/lv2lint/bin/lv2lint\"\
  203. \ -v\n"
  204. - name: Host test, pluginval, clap-validator, lv2lint (on what the archive holds)
  205. shell: bash
  206. env:
  207. LYNX_TEST_MODE: '1'
  208. run: 'curl -fsSL -o pv.zip "https://github.com/Tracktion/pluginval/releases/download/$PLUGINVAL_VERSION/pluginval_Linux.zip" && unzip -q
  209. pv.zip -d pv
  210. curl -fsSL -o cv.zip "$CLAP_VALIDATOR-ubuntu-22.04.zip" && unzip -q cv.zip -d cv
  211. for t in cv/*.tar.gz; do [ -e "$t" ] && tar xzf "$t" -C cv; done # (the Linux zip holds a tarball)
  212. chmod +x pv/pluginval "$(find cv -name clap-validator -type f | head -1)"
  213. ls pkg/LYNX-Plugins-"$LABEL"/LV2/*.lv2/manifest.ttl # (the archive holds the LV2 bundles)
  214. export LV2LINT="$RUNNER_TEMP/lv2lint/bin/lv2lint" LV2_PATH=/usr/lib/lv2
  215. xvfb-run -a ./scripts/check-plugins.sh "pkg/LYNX-Plugins-$LABEL" build/plugexporttest pv/pluginval "$(find cv -name clap-validator -type
  216. f | head -1)" reports pictures
  217. '
  218. - uses: actions/upload-artifact@v7
  219. with:
  220. name: LYNX-Plugins-${{ env.LABEL }}-linux-x86_64
  221. path: dist/*
  222. if-no-files-found: error
  223. - uses: actions/upload-artifact@v7
  224. if: ${{ !cancelled() }}
  225. with:
  226. name: plugin-reports-linux
  227. path: reports/*
  228. attach:
  229. name: Attach to the release
  230. needs:
  231. - version
  232. - linux
  233. - linux-arm64
  234. - plugins-linux
  235. runs-on: ubuntu-24.04
  236. permissions:
  237. contents: write
  238. env:
  239. LABEL: ${{ needs.version.outputs.label }}
  240. TAG: ${{ inputs.tag }}
  241. GH_TOKEN: ${{ github.token }}
  242. GH_REPO: ${{ github.repository }}
  243. steps:
  244. - uses: actions/download-artifact@v8
  245. with:
  246. pattern: LYNX-${{ env.LABEL }}-linux-*
  247. path: dist
  248. merge-multiple: true
  249. - uses: actions/download-artifact@v8
  250. with:
  251. name: LYNX-Plugins-${{ env.LABEL }}-linux-x86_64
  252. path: plugins
  253. - name: Upload the Linux files and update both SHA256SUMS files
  254. run: 'set -euo pipefail
  255. ls -la dist plugins
  256. gh release download "$TAG" -p SHA256SUMS.txt -p "LYNX-Plugins-$LABEL-SHA256SUMS.txt" -D old
  257. (cd dist && { grep -v -E -- "-(linux-x86_64\.tar\.gz|x86_64\.AppImage(\.zsync)?|linux-aarch64\.tar\.gz|aarch64\.AppImage(\.zsync)?)$"
  258. ../old/SHA256SUMS.txt || true; sha256sum -- *; } > ../SHA256SUMS.txt)
  259. (cd plugins && { grep -v -- "-linux-x86_64\.tar\.xz$" "../old/LYNX-Plugins-$LABEL-SHA256SUMS.txt" || true; sha256sum -- *; } > "../LYNX-Plugins-$LABEL-SHA256SUMS.txt")
  260. cat SHA256SUMS.txt "LYNX-Plugins-$LABEL-SHA256SUMS.txt"
  261. gh release upload "$TAG" dist/* plugins/* SHA256SUMS.txt "LYNX-Plugins-$LABEL-SHA256SUMS.txt" --clobber
  262. '