2022-06-14 19:44:14 +00:00
name : Sanity
on :
push :
branches :
- 'main'
pull_request :
branches :
- 'main'
env :
GTEST_OUTPUT : xml:./
jobs :
2022-06-15 15:53:50 +00:00
what-to-make :
2022-06-14 19:44:14 +00:00
runs-on : ubuntu-22.04
outputs :
2022-06-15 15:53:50 +00:00
make-cli : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.cli-changed == '1' }}
make-daemon : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.daemon-changed == '1' }}
2022-12-09 12:30:43 +00:00
make-dist : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.dist-changed == '1' }}
2022-06-15 15:53:50 +00:00
make-docs : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.docs-changed == '1' }}
make-gtk : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.gtk-changed == '1' }}
make-mac : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.mac-changed == '1' }}
make-qt : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.qt-changed == '1' }}
make-source-tarball : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.any-code-changed == '1' }}
make-tests : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.tests-changed == '1' }}
2022-08-16 22:47:02 +00:00
make-utils : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.utils-changed == '1' || steps.check-diffs.outputs.tests-changed == '1' }}
2023-01-26 04:17:24 +00:00
make-web : 'false' # this is handled in the webapp workflow
2022-06-15 15:53:50 +00:00
test-style : ${{ steps.check-main-push.outputs.is-main-push == '1' || steps.check-diffs.outputs.our-code-changed == '1' }}
2022-06-14 19:44:14 +00:00
steps :
2022-11-28 21:09:18 +00:00
- name : Check Push to Main Branch
id : check-main-push
2022-06-14 19:44:14 +00:00
run : |
2022-11-28 21:00:34 +00:00
set -x
2022-12-08 22:41:28 +00:00
if [ "$GITHUB_EVENT_NAME" = 'push' ] && [ "$GITHUB_REF_NAME" = 'main' ]; then
echo is-main-push=1 >> "$GITHUB_OUTPUT"
else
echo is-main-push=0 >> "$GITHUB_OUTPUT"
2022-06-14 19:44:14 +00:00
fi
- name : Get Source
id : get-source
uses : actions/checkout@v3
with :
fetch-depth : 0
path : src
submodules : recursive
- name : Check for diffs
id : check-diffs
run : |
set +e
2022-12-08 22:48:11 +00:00
cd src
2022-12-08 22:41:28 +00:00
MERGE_BASE=`git merge-base origin/main HEAD`
function get_changes() { # name, paths...
local name="$1"
shift
2022-12-08 22:48:11 +00:00
git diff --exit-code "$MERGE_BASE" -- "$@"
2022-12-08 22:41:28 +00:00
echo "$name-changed=$?" >> "$GITHUB_OUTPUT"
}
2023-02-19 16:10:25 +00:00
get_changes cli CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission cli
get_changes any-code CMakeLists.txt cmake Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web third-party
get_changes our-code CMakeLists.txt cmake Transmission.xcodeproj libtransmission cli daemon gtk macosx qt utils tests web
get_changes daemon CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission daemon
2022-12-09 12:30:43 +00:00
get_changes dist dist
2022-12-08 22:41:28 +00:00
get_changes docs docs
2023-02-19 16:10:25 +00:00
get_changes gtk CMakeLists.txt cmake third-party libtransmission gtk
get_changes mac CMakeLists.txt cmake Transmission.xcodeproj third-party libtransmission macosx Transmission.xcodeproj
get_changes qt CMakeLists.txt cmake third-party libtransmission qt
get_changes tests CMakeLists.txt cmake third-party libtransmission utils tests
get_changes utils CMakeLists.txt cmake third-party libtransmission utils
get_changes web CMakeLists.txt cmake third-party libtransmission web
2022-06-14 19:44:14 +00:00
code-style :
runs-on : ubuntu-22.04
2022-06-15 15:53:50 +00:00
needs : [ what-to-make ]
if : ${{ needs.what-to-make.outputs.test-style == 'true' }}
2023-01-23 21:59:41 +00:00
env :
NODE_PATH : /usr/lib/nodejs:/usr/share/nodejs
2022-06-14 19:44:14 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Source
uses : actions/checkout@v3
with :
submodules : recursive
- name : Get Dependencies
run : |
2022-12-02 15:57:50 +00:00
set -ex
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
sudo add-apt-repository "deb http://apt.llvm.org/jammy/ llvm-toolchain-jammy-15 main"
2023-01-23 21:59:41 +00:00
sudo apt-get install -y clang-format-15 npm
2022-06-14 19:44:14 +00:00
- name : Check for style diffs
id : check-for-diffs
working-directory : .
run : |
./code_style.sh
set +e
git diff --exit-code > style.diff
2023-01-08 23:49:15 +00:00
echo "differs=$?" >> $GITHUB_OUTPUT
2022-06-14 19:44:14 +00:00
cat style.diff
set -e
- name : Upload Diffs
uses : actions/upload-artifact@v2
if : ${{ steps.check-for-diffs.outputs.differs == '1' }}
with :
name : code-style.diff
path : 'style.diff'
- name : Fail if diffs exist
if : ${{ steps.check-for-diffs.outputs.differs == '1' }}
run : |
2022-06-21 17:25:16 +00:00
echo "code style does not match expected."
cat style.diff
echo "When CI is done, the above patch will be uploaded as 'code-style.diff' to https://github.com/${GITHUB_REPOSITORY}/actions/runs/${GITHUB_RUN_ID}/ ."
2022-06-14 19:44:14 +00:00
exit 1
sanitizer-tests :
runs-on : ubuntu-22.04
2022-06-15 15:53:50 +00:00
needs : [ what-to-make ]
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2023-01-23 21:59:41 +00:00
env :
NODE_PATH : /usr/lib/nodejs:/usr/share/nodejs
2022-06-14 19:44:14 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Dependencies
run : |
set -ex
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ca-certificates \
clang \
cmake \
gettext \
libcurl4-openssl-dev \
libdeflate-dev \
libevent-dev \
libfmt-dev \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev \
2023-01-23 21:59:41 +00:00
ninja-build \
npm
2022-06-14 19:44:14 +00:00
- name : Get Source
uses : actions/checkout@v3
with :
submodules : recursive
path : src
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=Debug \
-DCMAKE_CXX_COMPILER='clang++' \
-DCMAKE_CXX_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
-DCMAKE_C_COMPILER='clang' \
-DCMAKE_C_FLAGS='-gdwarf-4 -fno-omit-frame-pointer -fsanitize=address,leak,undefined' \
-DCMAKE_INSTALL_PREFIX=pfx \
-DENABLE_CLI=OFF \
-DENABLE_DAEMON=OFF \
-DENABLE_GTK=OFF \
-DENABLE_MAC=OFF \
-DENABLE_QT=OFF \
-DENABLE_TESTS=ON \
-DENABLE_UTILS=ON \
-DENABLE_WEB=OFF \
-DRUN_CLANG_TIDY=OFF
- name : Make
run : cmake --build obj --config Debug --target libtransmission-test transmission-show
- name : Test with sanitizers
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config Debug --output-on-failure
2022-06-14 19:44:14 +00:00
macos-11 :
runs-on : macos-11
2022-06-15 15:53:50 +00:00
needs : [ what-to-make ]
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
2022-06-14 19:44:14 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
sw_vers
- name : Get Dependencies
2023-01-24 21:52:59 +00:00
run : |
brew update
2023-02-18 01:14:01 +00:00
brew install cmake gettext libdeflate libevent libnatpmp libpsl miniupnpc ninja node pkg-config
2022-06-14 19:44:14 +00:00
- name : Get Dependencies (GTK)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
2022-08-11 17:28:37 +00:00
run : brew install gtkmm3 libjpeg
2022-06-14 19:44:14 +00:00
- name : Get Dependencies (Qt)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-qt == 'true' }}
2022-06-14 19:44:14 +00:00
run : brew install qt@5
- name : Get Source
uses : actions/checkout@v3
with :
path : src
submodules : recursive
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=pfx \
-DCMAKE_OSX_ARCHITECTURES='x86_64' \
-DCMAKE_PREFIX_PATH=`brew --prefix`/opt/qt@5 \
2022-06-15 15:53:50 +00:00
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
-DENABLE_MAC=${{ (needs.what-to-make.outputs.make-mac == 'true') && 'ON' || 'OFF' }} \
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
-DENABLE_TESTS=OFF \
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON \
2022-06-15 15:53:50 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Make
run : cmake --build obj --config RelWithDebInfo
- name : Test
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
env :
TMPDIR : /private/tmp
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
2022-06-15 15:53:50 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install/strip
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}
path : pfx/**/*
alpine-musl :
2022-06-17 21:52:39 +00:00
needs : [ what-to-make ]
2022-06-15 15:53:50 +00:00
runs-on : ubuntu-22.04
container :
image : radupopescu/musl-builder
2022-06-29 05:36:42 +00:00
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
2022-06-15 15:53:50 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Dependencies
run : |
set -ex
apk update
apk add \
ca-certificates \
cmake \
curl-dev \
fmt-dev \
2022-08-16 22:47:02 +00:00
g++ \
gettext-dev \
git \
2022-06-15 15:53:50 +00:00
libevent-dev \
libpsl \
2022-08-16 22:47:02 +00:00
linux-headers \
2022-06-15 15:53:50 +00:00
miniupnpc-dev \
ninja \
2023-01-23 21:59:41 +00:00
npm \
2022-06-15 15:53:50 +00:00
pkgconfig \
xz
- name : Get Dependencies (GTK)
2022-06-29 05:36:42 +00:00
if : ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
2022-06-15 15:53:50 +00:00
run : apk add --upgrade glibmm-dev gtkmm3-dev
- name : Get Dependencies (Qt)
2022-06-29 05:36:42 +00:00
if : ${{ needs.what-to-make.outputs.make-qt == 'true' }}
2022-12-27 17:18:51 +00:00
run : apk add --upgrade qt5-qtbase-dev qt5-qtsvg-dev qt5-qttools-dev
2022-06-15 15:53:50 +00:00
- name : Get Source
uses : actions/checkout@v3
with :
path : src
submodules : recursive
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=pfx \
-DCMAKE_PREFIX_PATH=`brew --prefix`/opt/qt@5 \
2022-06-29 05:36:42 +00:00
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
2022-06-15 15:53:50 +00:00
-DENABLE_MAC=OFF \
2022-06-29 05:36:42 +00:00
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
2022-06-14 19:44:14 +00:00
-DENABLE_TESTS=OFF \
2022-06-29 05:36:42 +00:00
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON \
2022-06-14 19:44:14 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Make
run : cmake --build obj --config RelWithDebInfo
- name : Test
2022-06-29 05:36:42 +00:00
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2022-06-14 19:44:14 +00:00
env :
TMPDIR : /private/tmp
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
2022-06-14 19:44:14 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install/strip
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}
path : pfx/**/*
2022-11-26 16:14:37 +00:00
windows :
needs : [ what-to-make ]
runs-on : windows-2022
2022-12-09 12:30:43 +00:00
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-dist == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
2022-11-26 16:14:37 +00:00
strategy :
fail-fast : false
matrix :
arch : [ x64, x86]
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
- name : Get Build Tools
run : |
$DepsPrefix = (Join-Path (Get-Item .).Root.Name "${{ matrix.arch }}-prefix")
"DEPS_PREFIX=${DepsPrefix}" | Out-File $Env:GITHUB_ENV -Append
(Join-Path $DepsPrefix bin) | Out-File $Env:GITHUB_PATH -Append
choco install `
jom `
2023-01-23 21:59:41 +00:00
nasm `
nodejs
2022-11-26 16:14:37 +00:00
choco uninstall `
openssl.light
(Join-Path $Env:ProgramFiles NASM) | Out-File $Env:GITHUB_PATH -Append
2022-12-09 12:30:43 +00:00
(Join-Path ${Env:ProgramFiles(x86)} 'WiX Toolset v3.11' bin) | Out-File $Env:GITHUB_PATH -Append
2022-11-26 16:14:37 +00:00
Install-Module -Name Pscx -RequiredVersion 4.0.0-beta4 -AllowPrerelease -Force
- name : Get Source
uses : actions/checkout@v3
with :
path : src
submodules : recursive
- name : Get Cache Key
id : cache-key
run : |
try {
$DepsHash = & (Join-Path . src release windows main.ps1) -Mode DepsHash -BuildArch ${{ matrix.arch }}
"hash=${DepsHash}" | Out-File $Env:GITHUB_OUTPUT -Append
} catch {
Write-Error ("{1}{0}{2}{0}{3}" -f [Environment]::NewLine, $_.ToString(), $_.InvocationInfo.PositionMessage, $_.ScriptStackTrace) -ErrorAction Continue
exit 1
}
- name : Get Cache
uses : actions/cache@v3
id : cache
with :
path : ${{ env.DEPS_PREFIX }}
key : ${{ github.job }}-${{ matrix.arch }}-${{ steps.cache-key.outputs.hash }}
- name : Build Dependencies
if : steps.cache.outputs.cache-hit != 'true'
run : |
try {
& (Join-Path . src release windows main.ps1) -Mode Build -BuildArch ${{ matrix.arch }} -BuildPart Deps
} catch {
Write-Error ("{1}{0}{2}{0}{3}" -f [Environment]::NewLine, $_.ToString(), $_.InvocationInfo.PositionMessage, $_.ScriptStackTrace) -ErrorAction Continue
exit 1
}
- name : Configure
run : |
Import-VisualStudioVars -VisualStudioVersion 2022 -Architecture ${{ matrix.arch }}
cmake `
-S src `
-B obj `
-G Ninja `
-DCMAKE_BUILD_TYPE=RelWithDebInfo `
-DCMAKE_INSTALL_PREFIX=pfx `
-DCMAKE_PREFIX_PATH="${Env:DepsPrefix}" `
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} `
2022-12-09 12:30:43 +00:00
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-dist == 'true') && 'ON' || 'OFF' }} `
2022-11-26 16:14:37 +00:00
-DENABLE_GTK=OFF `
-DENABLE_MAC=OFF `
2022-12-09 12:30:43 +00:00
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-dist == 'true' || needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} `
2022-11-26 16:14:37 +00:00
-DENABLE_TESTS=ON `
2022-12-20 18:27:02 +00:00
-DENABLE_UTILS=ON `
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} `
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON `
2022-11-26 16:14:37 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Make
run : |
Import-VisualStudioVars -VisualStudioVersion 2022 -Architecture ${{ matrix.arch }}
cmake --build obj --config RelWithDebInfo
- name : Test
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure --timeout 600
2022-11-26 16:14:37 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install
2022-12-09 12:30:43 +00:00
- name : Package
2023-01-08 22:34:59 +00:00
if : ${{ needs.what-to-make.outputs.make-dist == 'true' || (needs.what-to-make.outputs.make-daemon == 'true' && needs.what-to-make.outputs.make-qt == 'true') }}
2022-12-09 12:30:43 +00:00
run : |
Import-VisualStudioVars -VisualStudioVersion 2022 -Architecture ${{ matrix.arch }}
cmake --build obj --config RelWithDebInfo --target pack-msi
2022-11-26 16:14:37 +00:00
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}-${{ matrix.arch }}
path : pfx/**/*
2022-12-09 12:30:43 +00:00
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}-${{ matrix.arch }}-msi
path : obj/dist/msi/*.msi
2022-11-26 16:14:37 +00:00
2022-06-14 19:44:14 +00:00
make-source-tarball :
runs-on : ubuntu-22.04
2022-06-15 15:53:50 +00:00
needs : [ what-to-make ]
if : ${{ needs.what-to-make.outputs.make-source-tarball == 'true' }}
2022-06-14 19:44:14 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Dependencies
run : |
set -ex
sudo apt-get update
sudo apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
libcurl4-openssl-dev \
libssl-dev \
ninja-build
- name : Get Source
uses : actions/checkout@v3
with :
path : src
submodules : recursive
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja
- name : Create source tarball
run : cmake --build obj --target package_source
- uses : actions/upload-artifact@v3
with :
name : source-tarball
path : obj/transmission*.tar.*
macos-11-from-tarball :
2022-06-15 15:53:50 +00:00
needs : [ make-source-tarball, what-to-make ]
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-mac == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
2022-06-14 19:44:14 +00:00
runs-on : macos-11
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
sw_vers
- name : Get Dependencies
2023-01-24 21:52:59 +00:00
run : |
brew update
2023-02-18 01:14:01 +00:00
brew install cmake gettext libdeflate libevent libnatpmp libpsl miniupnpc ninja node pkg-config
2022-06-14 19:44:14 +00:00
- name : Get Dependencies (GTK)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
2022-08-11 17:28:37 +00:00
run : brew install gtkmm3 libjpeg
2022-06-14 19:44:14 +00:00
- name : Get Dependencies (Qt)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-qt == 'true' }}
2022-06-14 19:44:14 +00:00
run : brew install qt@5
- name : Get Source
uses : actions/download-artifact@v3
with :
name : source-tarball
- name : Extract Source
run : mkdir src && tar xf transmission*.tar.* -C src --strip-components 1
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=pfx \
-DCMAKE_OSX_ARCHITECTURES='x86_64' \
-DCMAKE_PREFIX_PATH=`brew --prefix`/opt/qt@5 \
2022-06-15 15:53:50 +00:00
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
-DENABLE_MAC=${{ (needs.what-to-make.outputs.make-mac == 'true') && 'ON' || 'OFF' }} \
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
-DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON \
2022-06-14 19:44:14 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Make
run : cmake --build obj --config RelWithDebInfo
- name : Test
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2022-06-14 19:44:14 +00:00
env :
TMPDIR : /private/tmp
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
2022-06-14 19:44:14 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install/strip
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}
path : pfx/**/*
debian-11-from-tarball :
2022-06-15 15:53:50 +00:00
needs : [ make-source-tarball, what-to-make ]
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
2022-06-14 19:44:14 +00:00
runs-on : ubuntu-22.04
2023-01-23 21:59:41 +00:00
env :
NODE_PATH : /usr/lib/nodejs:/usr/share/nodejs
2022-06-14 19:44:14 +00:00
container :
image : debian:11-slim
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Dependencies
run : |
set -ex
apt-get update
apt-get install -y --no-install-recommends \
ca-certificates \
cmake \
g++ \
gettext \
libcurl4-openssl-dev \
libdeflate-dev \
libevent-dev \
libfmt-dev \
libminiupnpc-dev \
libnatpmp-dev \
libpsl-dev \
libssl-dev \
ninja-build \
2023-01-23 21:59:41 +00:00
npm \
2022-06-14 19:44:14 +00:00
pkg-config \
xz-utils
- name : Get Dependencies (GTK)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
2022-06-14 19:44:14 +00:00
run : apt-get install -y --no-install-recommends libglibmm-2.4-dev libgtkmm-3.0-dev
- name : Get Dependencies (Qt)
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-qt == 'true' }}
2022-12-27 17:18:51 +00:00
run : apt-get install -y --no-install-recommends qtbase5-dev libqt5svg5-dev qttools5-dev
2022-06-14 19:44:14 +00:00
- name : Get Source
uses : actions/download-artifact@v3
with :
name : source-tarball
- name : Extract Source
run : mkdir src && tar xf transmission*.tar.* -C src --strip-components 1
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=pfx \
2022-06-15 15:53:50 +00:00
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
2022-10-09 09:13:02 +00:00
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
-DENABLE_MAC=OFF \
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
-DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON \
2022-10-09 09:13:02 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Build
run : cmake --build obj --config RelWithDebInfo
- name : Test
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
2022-10-09 09:13:02 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install/strip
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}
path : pfx/**/*
2022-11-02 03:15:31 +00:00
fedora-36-from-tarball :
2022-10-09 09:13:02 +00:00
needs : [ make-source-tarball, what-to-make ]
if : ${{ needs.what-to-make.outputs.make-cli == 'true' || needs.what-to-make.outputs.make-daemon == 'true' || needs.what-to-make.outputs.make-gtk == 'true' || needs.what-to-make.outputs.make-qt == 'true' || needs.what-to-make.outputs.make-tests == 'true' || needs.what-to-make.outputs.make-utils == 'true' }}
runs-on : ubuntu-22.04
2023-01-23 21:59:41 +00:00
env :
NODE_PATH : /usr/lib/nodejs:/usr/share/nodejs
2022-10-09 09:13:02 +00:00
container :
2022-11-02 03:15:31 +00:00
image : fedora:36
2022-10-09 09:13:02 +00:00
steps :
- name : Show Configuration
run : |
echo '${{ toJSON(needs) }}'
echo '${{ toJSON(runner) }}'
cat /etc/os-release
- name : Get Dependencies
run : |
set -ex
dnf install -y \
ca-certificates \
cmake \
fmt-devel \
gcc-c++ \
gettext \
libcurl-devel \
libdeflate-devel \
libevent-devel \
libnatpmp-devel \
libpsl-devel \
miniupnpc-devel \
ninja-build \
2023-01-23 21:59:41 +00:00
npm \
2022-10-09 09:13:02 +00:00
openssl-devel \
pkgconf-pkg-config \
xz
- name : Get Dependencies (GTK)
if : ${{ needs.what-to-make.outputs.make-gtk == 'true' }}
run : dnf install -y glibmm2.68-devel gtkmm4.0-devel
- name : Get Dependencies (Qt)
if : ${{ needs.what-to-make.outputs.make-qt == 'true' }}
2022-12-27 17:18:51 +00:00
run : dnf install -y qt6-qtbase-devel qt6-qtsvg-devel qt6-qttools-devel
2022-10-09 09:13:02 +00:00
- name : Get Source
uses : actions/download-artifact@v3
with :
name : source-tarball
- name : Extract Source
run : mkdir src && tar xf transmission*.tar.* -C src --strip-components 1
- name : Configure
run : |
cmake \
-S src \
-B obj \
-G Ninja \
-DCMAKE_BUILD_TYPE=RelWithDebInfo \
-DCMAKE_INSTALL_PREFIX=pfx \
-DENABLE_CLI=${{ (needs.what-to-make.outputs.make-cli == 'true') && 'ON' || 'OFF' }} \
-DENABLE_DAEMON=${{ (needs.what-to-make.outputs.make-daemon == 'true') && 'ON' || 'OFF' }} \
2022-06-15 15:53:50 +00:00
-DENABLE_GTK=${{ (needs.what-to-make.outputs.make-gtk == 'true') && 'ON' || 'OFF' }} \
2022-06-14 19:44:14 +00:00
-DENABLE_MAC=OFF \
2022-06-15 15:53:50 +00:00
-DENABLE_QT=${{ (needs.what-to-make.outputs.make-qt == 'true') && 'ON' || 'OFF' }} \
-DENABLE_TESTS=${{ (needs.what-to-make.outputs.make-tests == 'true') && 'ON' || 'OFF' }} \
-DENABLE_UTILS=${{ (needs.what-to-make.outputs.make-utils == 'true') && 'ON' || 'OFF' }} \
2023-01-23 21:59:41 +00:00
-DENABLE_WEB=${{ (needs.what-to-make.outputs.make-web == 'true') && 'ON' || 'OFF' }} \
2022-12-16 22:38:30 +00:00
-DENABLE_WERROR=ON \
2022-06-14 19:44:14 +00:00
-DRUN_CLANG_TIDY=OFF
- name : Build
run : cmake --build obj --config RelWithDebInfo
- name : Test
2022-06-15 15:53:50 +00:00
if : ${{ needs.what-to-make.outputs.make-tests == 'true' }}
2023-02-11 17:27:36 +00:00
run : cmake -E chdir obj ctest -j $(nproc) --build-config RelWithDebInfo --output-on-failure
2022-06-14 19:44:14 +00:00
- name : Install
run : cmake --build obj --config RelWithDebInfo --target install/strip
- uses : actions/upload-artifact@v3
with :
name : binaries-${{ github.job }}
path : pfx/**/*