Skip to content

Release: 0.9.9.2

Release: 0.9.9.2 #297

Workflow file for this run

name: CI
on: [push, pull_request, workflow_dispatch]
env:
# Path to the solution file relative to the root of the project.
SOLUTION_FILE_PATH: .
# Configuration type to build.
# You can convert this to a build matrix if you need coverage of multiple configuration types.
# https://docs.github.com/actions/learn-github-actions/managing-complex-workflows#using-a-build-matrix
BUILD_CONFIGURATION: Release
jobs:
build:
name: Build & test on ${{ matrix.os }} with ${{ matrix.compiler }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-12, windows-latest]
steps:
- name: Checkout
uses: actions/checkout@v4
with:
submodules: recursive
- name: Sys info
if: "startsWith(matrix.os, 'windows')"
run: wmic cpu get name, numberofcores, maxclockspeed
- name: Sys info
if: "startsWith(matrix.os, 'mac')"
run: sysctl -a | grep cpu | grep hw
- name: Sys info
if: "startsWith(matrix.os, 'ubuntu')"
run: |
echo $GITHUB_REF
echo "github.ref_name=${{github.ref_name}}"
lscpu
- name: Install Qt
if: "startsWith(matrix.os, 'windows')"
uses: jurplel/install-qt-action@v3
with:
version: '6.6.3'
arch: 'win64_msvc2019_64'
archives: 'qtbase icu qtsvg'
modules: 'qt5compat qtimageformats'
- name: Install Qt
if: "startsWith(matrix.os, 'ubuntu')"
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
arch: 'gcc_64'
archives: 'qtbase icu qtsvg'
modules: 'qt5compat qtimageformats'
- name: Install Qt
if: "startsWith(matrix.os, 'macos')"
uses: jurplel/install-qt-action@v3
with:
version: '6.6.1'
arch: 'clang_64'
archives: 'qtbase icu qtsvg'
modules: 'qt5compat qtimageformats'
- name: Windows - setup MSBuild
if: startsWith(matrix.os, 'windows')
uses: microsoft/setup-msbuild@v1
- name: Windows - building main installer
if: startsWith(matrix.os, 'windows')
shell: cmd
run: |
%Qt6_DIR%\bin\qmake.exe -v
set QTDIR64=%Qt6_DIR%
cd installer\windows\
create_installer.bat
cd ..\..
xcopy /R /Y .\installer\windows\binaries\64\msvcr\* .\bin\release\x64\
xcopy /R /Y .\installer\windows\binaries\64\Qt\* .\bin\release\x64\
- name: Mac
if: startsWith(matrix.os, 'macos')
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
clang --version
./installer/mac/create_dmg.sh $Qt6_DIR
- name: Linux
if: startsWith(matrix.os, 'ubuntu')
working-directory: ${{env.GITHUB_WORKSPACE}}
run: |
export QT_DEBUG_PLUGINS=1
sudo apt update -y; sudo apt install -qq gcc-12 g++-12 libglu1-mesa-dev libx11-xcb-dev '^libxcb*' '^libxkb*' libfuse2
sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-12 50
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-12 50
g++ --version
export PATH=$Qt6_DIR/bin/:$PATH
wget -c -nv "https://github.com/probonopd/linuxdeployqt/releases/download/7/linuxdeployqt-7-x86_64.AppImage"
chmod a+x linuxdeployqt-7-x86_64.AppImage
unset QTDIR; unset QT_PLUGIN_PATH ; unset LD_LIBRARY_PATH
$Qt6_DIR/bin/qmake -r CONFIG+=release
make -j
# Linux: building AppImage
cp ./qt-app/resources/icon.png ./bin/release/x64/
cp ./installer/linux/file_commander.desktop ./bin/release/x64/
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:${Qt6_DIR}/lib/
sudo ldconfig
./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/FileCommander -appimage -unsupported-allow-new-glibc -bundle-non-qt-libs -qmake=$Qt6_DIR/bin/qmake -executable=./bin/release/x64/libplugin_filecomparison.so.1.0.0 -executable=./bin/release/x64/libplugin_imageviewer.so.1.0.0 -executable=./bin/release/x64/libplugin_textviewer.so.1.0.0
ls -Ac
mv ./File_Commander*.AppImage ./FileCommander.AppImage
- name: Test launch
if: startsWith(matrix.os, 'macos')
run: ./bin/release/x64/FileCommander.app/Contents/MacOS/FileCommander --test-launch
- name: Test launch
if: startsWith(matrix.os, 'ubuntu')
run: |
xvfb-run --auto-servernum ./bin/release/x64/FileCommander --test-launch
- name: Test launch
if: startsWith(matrix.os, 'widows')
run: |
.\bin\release\x64\FileCommander.exe --test-launch
- name: Building tests - Windows
if: startsWith(matrix.os, 'windows')
working-directory: ${{env.GITHUB_WORKSPACE}}
shell: cmd
run: |
cd file-commander-core\core-tests\
dir
call "%programfiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvarsall.bat" amd64 && "%Qt6_DIR%\bin\qmake.exe" -tp vc -r
msbuild /t:Build /p:Configuration=Release;PlatformToolset=v143 core-tests.sln
cd ..\..
- name: Running tests - Windows
if: startsWith(matrix.os, 'windows')
shell: powershell
run: |
.\bin\release\x64\fso_test.exe
.\bin\release\x64\fso_test_high_level.exe
For ($i=1; $i -le 20; $i++) {
$randomSeed = ((get-date -Uformat %s).remove(10, 1));
$randomSeed = $randomSeed.substring($randomSeed.Length - 8);
& .\bin\release\x64\operationperformer_test.exe --std-seed $randomSeed;
}
$randomSeed = ((get-date -Uformat %s).remove(10, 1));
$randomSeed = $randomSeed.substring($randomSeed.Length - 8);
& .\bin\release\x64\filecomparator_test.exe --std-seed $randomSeed;
- name: Building tests - Mac
if: startsWith(matrix.os, 'macos')
run: |
cd file-commander-core/core-tests
$Qt6_DIR/bin/qmake -r CONFIG+=release
make -j
cd ../../
for f in $(find bin/release/x64/ -name *.app); do $Qt6_DIR/bin/macdeployqt $f; done
- name: Running tests - Mac
if: startsWith(matrix.os, 'macos')
run: |
set -e; ./bin/release/x64/fso_test.app/Contents/MacOS/fso_test
set -e; ./bin/release/x64/fso_test_high_level.app/Contents/MacOS/fso_test_high_level
set -e; for i in `seq 1 20`; do ./bin/release/x64/operationperformer_test.app/Contents/MacOS/operationperformer_test --std-seed $(date +%s); sleep 1; done
set -e; ./bin/release/x64/filecomparator_test.app/Contents/MacOS/filecomparator_test --std-seed $(date +%s)
- name: Building tests - Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
cd file-commander-core/core-tests
$Qt6_DIR/bin/qmake -r CONFIG+=release
make -j
cd ../../
for f in $(find bin/release/x64/ -name *.app); do $Qt6_DIR/bin/macdeployqt $f; done
./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/fso_test -unsupported-allow-new-glibc -bundle-non-qt-libs
./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/fso_test_high_level -unsupported-allow-new-glibc -bundle-non-qt-libs
./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/operationperformer_test -unsupported-allow-new-glibc -bundle-non-qt-libs
./linuxdeployqt-7-x86_64.AppImage ./bin/release/x64/filecomparator_test -unsupported-allow-new-glibc -bundle-non-qt-libs
- name: Running tests - Linux
if: startsWith(matrix.os, 'ubuntu')
run: |
set -e; ./bin/release/x64/fso_test
set -e; ./bin/release/x64/fso_test_high_level
set -e; for i in `seq 1 20`; do ./bin/release/x64/operationperformer_test --std-seed $(date +%s); sleep 1; done
set -e; ./bin/release/x64/filecomparator_test --std-seed $(date +%s)
- name: Archive DMG
if: success() && startsWith(matrix.os, 'macos')
uses: actions/upload-artifact@v4
with:
name: FileCommander.dmg
path: FileCommander.dmg
- name: Archive AppImage
if: success() && startsWith(matrix.os, 'ubuntu')
uses: actions/upload-artifact@v4
with:
name: FileCommander.AppImage
path: FileCommander.AppImage
- name: Archive Installer
if: success() && startsWith(matrix.os, 'windows')
uses: actions/upload-artifact@v4
with:
name: FileCommander.exe
path: installer/windows/FileCommander.exe
create-release:
needs: build
if: success() && startsWith(github.ref, 'refs/tags/')
runs-on: ubuntu-latest
steps:
- name: Download EXE
uses: actions/download-artifact@v4
with:
name: FileCommander.exe
path: .
- name: Download DMG
uses: actions/download-artifact@v4
with:
name: FileCommander.dmg
path: .
- name: Download AppImage
uses: actions/download-artifact@v4
with:
name: FileCommander.AppImage
path: .
- name: Create Release
uses: softprops/action-gh-release@v2
if: success() && ${{ startsWith(github.event.workflow_run.head_commit.message, 'Release') }}
with:
generate_release_notes: true
files: |
FileCommander.exe
FileCommander.dmg
FileCommander.AppImage
token: ${{ secrets.GITHUB_TOKEN }}
tag_name: ${{ github.ref }}
name: ${{ github.ref_name }}