Release #118
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Release | |
on: | |
workflow_dispatch | |
jobs: | |
setup: | |
name: Setup | |
uses: tlslink/sslcon/.github/workflows/release-setup.yml@main | |
build: | |
name: Build | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
build: [linux, linux-latest, windows, macos, macos-arm64] | |
include: | |
- build: linux-latest | |
os: ubuntu-22.04 | |
qt: 6.8.1 | |
arch: linux_gcc_64 | |
qt-modules: 'qtwebsockets' | |
# qt-tools: 'tools_ifw' | |
installer-name: anylink-linux-amd64.run | |
- build: linux | |
os: ubuntu-20.04 | |
qt: 6.4.3 | |
arch: gcc_64 | |
qt-modules: 'qtwebsockets' | |
# qt-tools: 'tools_ifw' | |
installer-name: anylink-linux-amd64.run | |
- build: windows | |
os: windows-2019 | |
qt: 6.6.2 | |
arch: win64_msvc2019_64 | |
qt-modules: 'qtwebsockets' | |
qt-tools: 'tools_qtcreator' | |
installer-name: anylink-windows10-amd64.exe | |
- build: macos | |
os: macos-latest | |
qt: 6.8.1 | |
arch: clang_64 | |
qt-modules: 'qtwebsockets' | |
# qt-tools: 'tools_ifw' | |
installer-name: anylink-installer | |
- build: macos-arm64 | |
os: macos-latest | |
qt: 6.8.1 | |
arch: clang_64 | |
qt-modules: 'qtwebsockets' | |
# qt-tools: 'tools_ifw' | |
installer-name: anylink-installer | |
steps: | |
- if: startsWith(github.ref, 'refs/heads/') | |
shell: bash | |
run: | | |
if [ "${{ matrix.build }}" = "linux-latest" ]; then | |
echo "ARCHIVE_NAME=anylink-linux_latest-amd64.tar.gz" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "linux" ]; then | |
echo "ARCHIVE_NAME=anylink-linux-amd64.tar.gz" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "windows" ]; then | |
echo "ARCHIVE_NAME=anylink-windows10-amd64.zip" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "macos" ]; then | |
echo "ARCHIVE_NAME=anylink-macOS-amd64.dmg" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "macos-arm64" ]; then | |
echo "ARCHIVE_NAME=anylink-macOS-arm64.dmg" >> $GITHUB_ENV | |
fi | |
- if: startsWith(github.ref, 'refs/tags/') | |
shell: bash | |
run: | | |
if [ "${{ matrix.build }}" = "linux-latest" ]; then | |
echo "ARCHIVE_NAME=anylink-${{ github.ref_name }}-linux_latest-amd64.tar.gz" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "linux" ]; then | |
echo "ARCHIVE_NAME=anylink-${{ github.ref_name }}-linux-amd64.tar.gz" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "windows" ]; then | |
echo "ARCHIVE_NAME=anylink-${{ github.ref_name }}-windows10-amd64.zip" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "macos" ]; then | |
echo "ARCHIVE_NAME=anylink-${{ github.ref_name }}-macOS-amd64.dmg" >> $GITHUB_ENV | |
elif [ "${{ matrix.build }}" = "macos-arm64" ]; then | |
echo "ARCHIVE_NAME=anylink-${{ github.ref_name }}-macOS-arm64.dmg" >> $GITHUB_ENV | |
fi | |
- name: Install dependencies | |
shell: bash | |
run: | | |
if [ "${{ matrix.build }}" = "linux" -o "${{ matrix.build }}" = "linux-latest" ]; then | |
sudo apt-get update | |
DEBIAN_FRONTEND=noninteractive sudo apt-get install -y -q --force-yes \ | |
automake cmake git wget libfuse2 desktop-file-utils tree \ | |
build-essential libgl1-mesa-dev libxkbcommon-x11-0 libpulse-dev \ | |
libxcb-icccm4 libxcb-image0 libxcb-keysyms1 libxcb-render-util0 \ | |
libxcb-xinerama0 libxcb-composite0 libxcb-cursor0 libxcb-damage0 \ | |
libxcb-dpms0 libxcb-dri2-0 libxcb-dri3-0 libxcb-ewmh2 libxcb-glx0 \ | |
libxcb-present0 libxcb-randr0 libxcb-record0 libxcb-render0 libxcb-res0 \ | |
libxcb-screensaver0 libxcb-shape0 libxcb-shm0 libxcb-sync1 libxcb-util1 \ | |
libxkbcommon-x11-dev extra-cmake-modules fcitx-libs-dev | |
fi | |
# https://github.com/ilammy/msvc-dev-cmd | |
- if: matrix.build == 'windows' | |
name: Setup msvc | |
uses: ilammy/msvc-dev-cmd@v1 | |
- name: Install Qt | |
# https://github.com/jurplel/install-qt-action | |
uses: jurplel/install-qt-action@v4 | |
with: | |
arch: ${{ matrix.arch }} | |
version: ${{ matrix.qt }} # https://download.qt.io/online/qtsdkrepository/ | |
modules: ${{ matrix.qt-modules }} | |
tools: ${{ matrix.qt-tools }} | |
install-deps: false | |
cache: false | |
cache-key-prefix: 'cache-qt' | |
extra: '--base https://mirrors.ocf.berkeley.edu/qt' # https://download.qt.io/static/mirrorlist/ | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
fetch-depth: 0 | |
- name: Build | |
shell: bash | |
run: | | |
if [ "${{ matrix.build }}" = "linux" -o "${{ matrix.build }}" = "linux-latest" ]; then | |
qmake | |
make -j $(nproc) | |
wget -c -nv https://github.com/fcitx/fcitx-qt5/archive/refs/heads/master.zip | |
unzip master.zip | |
cd fcitx-qt5-master | |
cmake -DENABLE_QT5=Off -DENABLE_QT6=On . | |
make -j $(nproc) | |
cd .. | |
elif [ "${{ matrix.build }}" = "windows" ]; then | |
rm "C:\Program Files\Git\usr\bin\link.exe" | |
qmake | |
"${IQTA_TOOLS}/QtCreator/bin/jom/jom.exe" -j $(nproc) -f Makefile.Release | |
elif [ "${{ matrix.build }}" = "macos" ]; then | |
qmake | |
make -j $(sysctl -n hw.logicalcpu) | |
elif [ "${{ matrix.build }}" = "macos-arm64" ]; then | |
qmake | |
make -j $(sysctl -n hw.logicalcpu) | |
fi | |
- name: Build archive | |
shell: bash | |
run: | | |
echo $PATH | |
mkdir archive | |
# ls -lR | |
if [ "${{ matrix.build }}" = "linux" -o "${{ matrix.build }}" = "linux-latest" ]; then | |
# probonopd | |
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-x86_64.AppImage" | |
chmod a+x linuxdeployqt-continuous-x86_64.AppImage | |
./linuxdeployqt-continuous-x86_64.AppImage out/opt/anylink/bin/anylink -extra-plugins=platformthemes/libqgtk3.so -no-copy-copyright-files -no-translations -unsupported-allow-new-glibc | |
cp fcitx-qt5-master/qt6/platforminputcontext/libfcitxplatforminputcontextplugin-qt6.so out/opt/anylink/plugins/platforminputcontexts/ | |
wget -c -nv https://github.com/tlslink/sslcon/releases/download/continuous/sslcon-linux-amd64.tar.gz | |
tar -zxvf sslcon-*.tar.gz | |
cp vpnagent sslcon out/opt/anylink/bin | |
7z a installer/packages/root/data/anylink.7z ./out/opt/anylink/* | |
cd installer | |
wget -c -nv https://mirrors.ustc.edu.cn/qtproject/official_releases/qt-installer-framework/4.8.1/QtInstallerFramework-linux-x64-4.8.1.run | |
chmod +x ./*.run | |
./QtInstallerFramework-linux-x64-4.8.1.run --al --da -c -t `pwd`/ifw in | |
./ifw/bin/binarycreator --offline-only -c config/config.xml -p packages ${{ matrix.installer-name }} | |
chmod +x ./*.run | |
tar -zcvf "${{ github.workspace }}"/archive/${{ env.ARCHIVE_NAME }} ${{ matrix.installer-name }} | |
elif [ "${{ matrix.build }}" = "windows" ]; then | |
windeployqt out/bin/anylink.exe --no-translations --no-system-d3d-compiler --no-opengl-sw --no-svg | |
curl -k -L -O https://github.com/tlslink/sslcon/releases/download/continuous/sslcon-windows10-amd64.7z | |
7z x -y sslcon-*.7z | |
cp vpnagent.exe sslcon.exe out/bin | |
7z a installer/packages/root/data/anylink.7z ./out/bin/* | |
cd installer | |
curl -k -O -L https://mirrors.ustc.edu.cn/qtproject/archive/qt-installer-framework/4.5.2/QtInstallerFramework-windows-x64-4.5.2.exe | |
./QtInstallerFramework-windows-x64-4.5.2.exe --al --da -c -t `pwd`/ifw in | |
./ifw/bin/binarycreator --offline-only -c config/config.xml -p packages ${{ matrix.installer-name }} | |
# https://bugreports.qt.io/browse/QTIFW-2295 | |
editbin /subsystem:windows ${{ matrix.installer-name }} | |
7z a -tzip -r "${{ github.workspace }}"/archive/${{ env.ARCHIVE_NAME }} ${{ matrix.installer-name }} | |
elif [ "${{ matrix.build }}" = "macos" ]; then | |
cd installer | |
curl -k -O -L https://mirrors.ustc.edu.cn/qtproject/archive/qt-installer-framework/4.6.1/QtInstallerFramework-macOS-x64-4.6.1.dmg | |
hdiutil attach ./QtInstallerFramework-macOS-x64-4.6.1.dmg | |
/Volumes/QtInstallerFramework-macOS-x64-4.6.1/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/MacOS/QtInstallerFramework-macOS-x64-4.6.1 --al --da -c -t `pwd`/ifw in | |
cd ../out/bin | |
curl -k -L -O https://github.com/tlslink/sslcon/releases/download/continuous/sslcon-macOS-amd64.tar.gz | |
tar -zxvf sslcon-*.tar.gz | |
cp vpnagent sslcon AnyLink.app/Contents/MacOS | |
macdeployqt AnyLink.app | |
mkdir -p ../../installer/packages/root/data | |
../../installer/ifw/bin/archivegen ../../installer/packages/root/data/anylink.7z ./AnyLink.app | |
cd ../../installer | |
./ifw/bin/binarycreator --offline-only -c config/config.xml -p packages ${{ matrix.installer-name }} | |
hdiutil create -fs HFS+ -srcfolder ${{ matrix.installer-name }}.app -format UDZO "${{ github.workspace }}"/archive/${{ env.ARCHIVE_NAME }} | |
elif [ "${{ matrix.build }}" = "macos-arm64" ]; then | |
cd installer | |
curl -k -O -L https://mirrors.ustc.edu.cn/qtproject/archive/qt-installer-framework/4.6.1/QtInstallerFramework-macOS-x64-4.6.1.dmg | |
hdiutil attach ./QtInstallerFramework-macOS-x64-4.6.1.dmg | |
/Volumes/QtInstallerFramework-macOS-x64-4.6.1/QtInstallerFramework-macOS-x64-4.6.1.app/Contents/MacOS/QtInstallerFramework-macOS-x64-4.6.1 --al --da -c -t `pwd`/ifw in | |
cd ../out/bin | |
curl -k -L -O https://github.com/tlslink/sslcon/releases/download/continuous/sslcon-macOS-arm64.tar.gz | |
tar -zxvf sslcon-*.tar.gz | |
cp vpnagent sslcon AnyLink.app/Contents/MacOS | |
macdeployqt AnyLink.app | |
mkdir -p ../../installer/packages/root/data | |
../../installer/ifw/bin/archivegen ../../installer/packages/root/data/anylink.7z ./AnyLink.app | |
cd ../../installer | |
./ifw/bin/binarycreator --offline-only -c config/config.xml -p packages ${{ matrix.installer-name }} | |
hdiutil create -fs HFS+ -srcfolder ${{ matrix.installer-name }}.app -format UDZO "${{ github.workspace }}"/archive/${{ env.ARCHIVE_NAME }} | |
fi | |
- if: startsWith(github.ref, 'refs/heads/') | |
name: Continuous release | |
uses: softprops/action-gh-release@v1 | |
with: | |
prerelease: false | |
files: archive/${{ env.ARCHIVE_NAME }} | |
tag_name: continuous | |
- if: startsWith(github.ref, 'refs/tags/') && (matrix.build == 'windows') | |
name: Tagged release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release build (${{ github.ref_name }}) | |
body: 'See [README](https://github.com/tlslink/anylink-client) for more details.' | |
files: archive/${{ env.ARCHIVE_NAME }} | |
generate_release_notes: true | |
- if: startsWith(github.ref, 'refs/tags/') && (matrix.build != 'windows') | |
name: Tagged release | |
uses: softprops/action-gh-release@v1 | |
with: | |
name: Release build (${{ github.ref_name }}) | |
files: archive/${{ env.ARCHIVE_NAME }} |