From 687b9e7c505e994bc8b38551d7b2a201f6b2bb00 Mon Sep 17 00:00:00 2001 From: CoolmanCZ Date: Tue, 22 Oct 2024 16:54:20 +0200 Subject: [PATCH] Version 1.5.22 release - Build and release Windows binaries using GitHub actions - Remove AppVeyor build support - Submodules update --- .appveyor.yml | 122 ------------------------------------ .github/workflows/rajce.yml | 112 +++++++++++++++++++++++++++++++++ GenerateCMakeFiles.sh | 4 +- README.md | 7 ++- app/Rajce/Copying | 2 +- app/Rajce/Version.h | 6 +- upp_cmake | 2 +- 7 files changed, 123 insertions(+), 132 deletions(-) delete mode 100644 .appveyor.yml create mode 100644 .github/workflows/rajce.yml diff --git a/.appveyor.yml b/.appveyor.yml deleted file mode 100644 index 36d11c5..0000000 --- a/.appveyor.yml +++ /dev/null @@ -1,122 +0,0 @@ -#---------------------------------# -# general configuration # -#---------------------------------# -version: 1.0.{build} - -# branches to build -branches: - only: - - master - - /v\d*\.\d*\.\d*/ - -# Start builds on tags only (GitHub and BitBucket) -skip_non_tags: true -#skip_tags: true - -#---------------------------------# -# environment configuration # -#---------------------------------# -# Build worker image (VM template) -#image: Visual Studio 2017 - -# environment variables -environment: - matrix: - - platform: x86 - msystem: mingw32 - bit: 32bit - - platform: x64 - msystem: mingw64 - bit: 64bit - -# this is how to allow failing jobs in the matrix -matrix: - fast_finish: true # set this flag to immediately finish build once one of the jobs fails. - -#---------------------------------# -# install scripts # -#---------------------------------# -# scripts that run after cloning repository -install: - # by default, all script lines are interpreted as batch - - cmd: git submodule update --init --recursive - -#---------------------------------# -# build configuration # -#---------------------------------# -# to disable automatic builds - use build_script -build: off - -# scripts to run before build -before_build: - -# to run your custom scripts instead of automatic MSBuild -build_script: - - cmd: set PATH=C:\msys64\%MSYSTEM%\bin;C:\msys64\usr\bin;%PATH% - - cmd: grep '#define APP_VERSION_STR' %APPVEYOR_BUILD_FOLDER%/app/Rajce/Version.h > APP_VERSION - - cmd: sed -i -e 's/.*"\([0-9\.]*\)".*/\1/' APP_VERSION - - cmd: set /p APP_VERSION= < APP_VERSION - - cmd: echo %APP_VERSION% - - cmd: echo %NUMBER_OF_PROCESSORS% - - cmd: GenerateCMakeFiles.sh "MINGW" - - cmd: mkdir build.%MSYSTEM% - - cmd: cd build.%MSYSTEM% - - cmd: cmake -G "Unix Makefiles" .. - - cmd: mingw32-make -j %NUMBER_OF_PROCESSORS% - - cmd: cd %APPVEYOR_BUILD_FOLDER% - -# To create a single “zip” artifact with multiple files from different locations you can use 7z in “after build” script which is already available in PATH: -# 7z a myapp.zip %APPVEYOR_BUILD_FOLDER%\path\to\bin\*.dll -# Specifying the absolute path here is required to remove paths from archive. However, if you need to preserve paths in the archive use relative paths, like: -# 7z a myapp.zip path\to\bin\*.dll - -# scripts to run after build (working directory and environment changes are persisted from the previous steps) -after_build: - - cmd: mv %APPVEYOR_BUILD_FOLDER%\Rajce.upp.tar.bz2 %APPVEYOR_BUILD_FOLDER%\Rajce.upp-%APP_VERSION%.tar.bz2 - - cmd: cp %APPVEYOR_BUILD_FOLDER%\app\Rajce\Copying %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\LICENSE - - cmd: 7z a rajce-%APP_VERSION%-%BIT%.zip %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\bin\Rajce.exe %APPVEYOR_BUILD_FOLDER%\build.%MSYSTEM%\LICENSE - - cmd: sha256sum rajce-%APP_VERSION%-%BIT%.zip > rajce-%APP_VERSION%-%BIT%.zip.sha256 - - cmd: sha256sum %APPVEYOR_BUILD_FOLDER%\Rajce.upp-%APP_VERSION%.tar.bz2 > %APPVEYOR_BUILD_FOLDER%\Rajce.upp-%APP_VERSION%.tar.bz2.sha256 - -# scripts to run *after* solution is built and *before* automatic packaging occurs (web apps, NuGet packages, Azure Cloud Services) -before_package: - -#---------------------------------# -# test configuration # -#---------------------------------# -#To disable test phase completely -test: off - -#---------------------------------# -# artifacts configuration # -#---------------------------------# -artifacts: - - path: rajce-*.zip - name: App - - path: rajce-*.zip.sha256 - name: AppSha - - path: Rajce.upp-*.bz2 - name: AppSource - - path: Rajce.upp-*.bz2.sha256 - name: AppSourceSha - -#---------------------------------# -# deployment configuration # -#---------------------------------# -# provider names are case-sensitive! - -# Deploy to GitHub Releases -deploy: - - provider: GitHub - release: $(APPVEYOR_REPO_TAG_NAME) - # description is mandatory. If not specified, GitHub returns 422: Unprocessable entity error. - description: "$(APPVEYOR_REPO_COMMIT_MESSAGE)\n\n$(APPVEYOR_REPO_COMMIT_MESSAGE_EXTENDED)" - auth_token: - secure: /2wk1VbTrLPMDtwW9DAabAjZd4FmAddIENq5eGit+1JxlBCM9JSGmTyFq6Ioo1AeTn2985jFGbKfE+WIW2cnFQ4zyfdduhLH2AloQZw7r2ALTzqomu4acBdHsKI4LBQX - artifact: /App.*/ - draft: false - prerelease: false - on: -# branch: master # release from master branch only - appveyor_repo_tag: true # deploy on tag push only - diff --git a/.github/workflows/rajce.yml b/.github/workflows/rajce.yml new file mode 100644 index 0000000..70deba1 --- /dev/null +++ b/.github/workflows/rajce.yml @@ -0,0 +1,112 @@ +name: Rajce CMake build + +on: + push: + tags: + - 'v[0-9]+.[0-9]+.[0-9]+' + +env: + # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) + BUILD_TYPE: 'Release' + +jobs: + build: + strategy: + matrix: + include: + - { sys: mingw32, APP_BIT: '32bit' } + - { sys: mingw64, APP_BIT: '64bit' } + + runs-on: windows-latest + + outputs: + APP_VERSION: ${{steps.version.outputs.APP_VERSION}} + + env: + BUILD_DIR: build.${{matrix.sys}} + ROOT_DIR: ${{github.workspace}} + + steps: + - name: Checkout git repository + uses: actions/checkout@v4 + with: + submodules: true + + - name: Generate CMakeLists files + shell: bash + run: ./GenerateCMakeFiles.sh + + - name: Setup MSYS2 + uses: msys2/setup-msys2@v2 + with: + msystem: ${{matrix.sys}} + pacboy: >- + toolchain:p + cmake:p + ninja:p + + - name: Build binary + shell: msys2 {0} + run: | + cmake -G Ninja -B ${{env.BUILD_DIR}} -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} + cmake --build ${{env.BUILD_DIR}} + + - name: Parse version file + shell: bash + run: echo "APP_VERSION=$(grep '#define APP_VERSION_STR' '${{env.ROOT_DIR}}/app/Rajce/Version.h' | sed -e 's/.*"\([0-9\.]*\)".*/\1/')" >> "$GITHUB_ENV" + + - name: Export version information + id: version + shell: bash + run: echo "APP_VERSION=${{env.APP_VERSION}}" >> "$GITHUB_OUTPUT" + + - name: Create source archive + if: matrix.sys == 'mingw32' + shell: bash + run: | + dir + mv "${{env.ROOT_DIR}}/Rajce.upp.tar.bz2" "${{env.ROOT_DIR}}/Rajce.upp-${{env.APP_VERSION}}.tar.bz2" + sha256sum "${{env.ROOT_DIR}}/Rajce.upp-${{env.APP_VERSION}}.tar.bz2" > "${{env.ROOT_DIR}}/Rajce.upp-${{env.APP_VERSION}}.tar.bz2.sha256" + + - name: Create binary archive + shell: bash + run: | + cp "${{env.ROOT_DIR}}/app/Rajce/Copying" "${{env.BUILD_DIR}}/bin/LICENSE" + 7z a "${{env.ROOT_DIR}}/rajce-${{env.APP_VERSION}}-${{matrix.APP_BIT}}.zip" "./${{env.BUILD_DIR}}/bin/*" + sha256sum "${{env.ROOT_DIR}}/rajce-${{env.APP_VERSION}}-${{matrix.APP_BIT}}.zip" > "${{env.ROOT_DIR}}/rajce-${{env.APP_VERSION}}-${{matrix.APP_BIT}}.zip.sha256" + + - name: Store archives + uses: actions/upload-artifact@v4 + with: + name: ${{matrix.sys}}-archives + if-no-files-found: ignore + path: | + ${{env.ROOT_DIR}}/Rajce.upp-${{env.APP_VERSION}}.tar.bz2 + ${{env.ROOT_DIR}}/Rajce.upp-${{env.APP_VERSION}}.tar.bz2.sha256 + ${{env.ROOT_DIR}}/rajce-${{env.APP_VERSION}}-${{matrix.APP_BIT}}.zip + ${{env.ROOT_DIR}}/rajce-${{env.APP_VERSION}}-${{matrix.APP_BIT}}.zip.sha256 + + release: + needs: build + + runs-on: ubuntu-latest + + env: + APP_VERSION: ${{needs.build.outputs.APP_VERSION}} + + steps: + - name: Retrieve archives + uses: actions/download-artifact@v4 + with: + path: archives + merge-multiple: true + + - name: Create release + uses: svenstaro/upload-release-action@v2 + with: + release_name: 'v${{env.APP_VERSION}}' + target_commit: ${{github.sha}} + body: ${{ github.event.head_commit.message }} + file: archives/* + file_glob: true + diff --git a/GenerateCMakeFiles.sh b/GenerateCMakeFiles.sh index bf03f88..55ad309 100755 --- a/GenerateCMakeFiles.sh +++ b/GenerateCMakeFiles.sh @@ -1,6 +1,6 @@ #!/bin/bash # -# Copyright (C) 2016-2023 Radek Malcic +# Copyright (C) 2016-2024 Radek Malcic # # All rights reserved. # @@ -36,7 +36,7 @@ GENERATE_PACKAGE="1" # set to "1" - create a tarball package of the proje #GENERATE_NOT_Cxx="1" # set to "1" - do not use compiler -std=c++14 parameter (compiler parameter is enabled as default) #GENERATE_NOT_PARALLEL="1" # set to "1" - do not build with multiple processes (parralel build is enabled as default) -#GENERATE_NOT_PCH="1" # set to "1" - do not build with precompiled header support (precompiled header support is enabled as default) +GENERATE_NOT_PCH="1" # set to "1" - do not build with precompiled header support (precompiled header support is enabled as default) if [ "${OS}" == "SunOS" ]; then GENERATE_NOT_REMOVE_UNUSED_CODE="1" # set to "1" - do not use compile and link parameters to remove unused code and functions (unused code and functions are removed as default) fi diff --git a/README.md b/README.md index 54b5e7d..2e6443a 100644 --- a/README.md +++ b/README.md @@ -4,13 +4,13 @@ Rajce album downloader is the U++ GUI application to retrieve images/videos from [U++](http://www.ultimatepp.org/) is a C++ cross-platform rapid application development framework focused on programmers productivity. It includes a set of libraries (GUI, SQL, etc.), and an integrated development environment. -# AppVeyor build status +# GitHub actions build status -[AppVeyor](https://www.appveyor.com) is used to build Windows binaries and deploy them to the GitHub releases directory. +[GitHub actions](https://docs.github.com/en/actions) is used to build Windows binaries and deploy them to the GitHub releases directory. |branch | status| |--- |--- | -|master |[![Build status](https://ci.appveyor.com/api/projects/status/github/CoolmanCZ/rajce?svg=true)](https://ci.appveyor.com/project/CoolmanCZ/rajce)| +|master |[![Build status](https://github.com/CoolmanCZ/rajce/actions/workflows/rajce.yml/badge.svg?branch=master)](https://github.com/CoolmanCZ/rajce/actions/workflows/rajce.yml)| *The Windows executable is currently not signed, which will show a warning when you run the .exe. Press 'more info' -> 'run anyway' to skip the warning.* @@ -45,6 +45,7 @@ Download latest windows binaries and source code from [GitHub releases](https:// # Changelog +* 1.5.22 - Build and release Windows binaries using GitHub actions * 1.5.21 - Submodules update to fix build error * 1.5.20 - Option to continue with download in case of error 404 Not Found * 1.5.19 - Enable append of album user name to the download directory for authorized album only diff --git a/app/Rajce/Copying b/app/Rajce/Copying index 360cea5..241266d 100644 --- a/app/Rajce/Copying +++ b/app/Rajce/Copying @@ -1,5 +1,5 @@ -Copyright (C) 2016-2023 Radek Malcic +Copyright (C) 2016-2024 Radek Malcic All rights reserved. diff --git a/app/Rajce/Version.h b/app/Rajce/Version.h index 6085394..f75366e 100644 --- a/app/Rajce/Version.h +++ b/app/Rajce/Version.h @@ -11,14 +11,14 @@ #define APP_NAME "Rajce" #define APP_TITLE "Rajce album downloader" -#define APP_COPYRIGHT "Copyright (c) 2016-2023" +#define APP_COPYRIGHT "Copyright (c) 2016-2024" #define APP_MAJOR_VER 1 #define APP_MINOR_VER 5 -#define APP_PATCH_VER 21 +#define APP_PATCH_VER 22 #define APP_BUILD_VER 0 -#define APP_VERSION_STR "1.5.21" +#define APP_VERSION_STR "1.5.22" #define APP_VERSION_NUM TO_NUMBER(APP_MAJOR_VER, APP_MINOR_VER, APP_PATCH_VER, APP_BUILD_VER) #define APP_FILEVERSION APP_MAJOR_VER, APP_MINOR_VER, APP_PATCH_VER, APP_BUILD_VER diff --git a/upp_cmake b/upp_cmake index acb7be6..077aec0 160000 --- a/upp_cmake +++ b/upp_cmake @@ -1 +1 @@ -Subproject commit acb7be6edf119379f46afaeac8b0ceded93c6f59 +Subproject commit 077aec07041cf66617c0960978081a2dbb400dfe