diff options
author | saturneric <[email protected]> | 2024-11-22 08:20:52 +0000 |
---|---|---|
committer | saturneric <[email protected]> | 2024-11-22 08:20:52 +0000 |
commit | cf3a5958c1ae31242fbe1c7d4428f3a888377e7d (patch) | |
tree | 1cb88a70fa1c11a5602d288ee9268d8516c36916 /.github | |
parent | fix: short git commit sha on windows workflow not working (diff) | |
download | GpgFrontend-cf3a5958c1ae31242fbe1c7d4428f3a888377e7d.tar.gz GpgFrontend-cf3a5958c1ae31242fbe1c7d4428f3a888377e7d.zip |
feat: improve nightly and other workflows
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/release-qt5.yml | 31 | ||||
-rw-r--r-- | .github/workflows/release.yml | 42 | ||||
-rw-r--r-- | .github/workflows/testing-nightly.yml (renamed from .github/workflows/release-nightly.yml) | 97 |
3 files changed, 89 insertions, 81 deletions
diff --git a/.github/workflows/release-qt5.yml b/.github/workflows/release-qt5.yml index 7870159e..43de5317 100644 --- a/.github/workflows/release-qt5.yml +++ b/.github/workflows/release-qt5.yml @@ -1,16 +1,16 @@ -name: Build & Package Qt5 +name: Build Release (Qt5) on: push: - branches: [ main, 'develop', 'dev/**' ] + branches: [main] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" pull_request: - branches: [ main, 'develop', 'dev/**' ] + branches: [main] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" env: # Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.) @@ -20,7 +20,7 @@ jobs: build: strategy: matrix: - os: [ 'ubuntu-20.04', 'windows-2019' ] + os: ["ubuntu-20.04", "windows-2019"] runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 with: - lfs: 'false' + lfs: "false" submodules: recursive - name: Get Short SHA of Commit @@ -67,12 +67,12 @@ jobs: sudo apt-get -y install libglu1-mesa-dev libfontconfig1-dev libx11-xcb-dev libxcb-image0 sudo apt-get -y install libglu1-mesa-dev libfontconfig1-dev libx11-xcb-dev libxcb-* libxkbcommon-x11-0 if: matrix.os == 'ubuntu-20.04' - + - name: Install Qt5 uses: jurplel/install-qt-action@v3 with: - version: '5.15.2' - cache: 'true' + version: "5.15.2" + cache: "true" if: matrix.os == 'ubuntu-20.04' - name: Build gpg-error (Windows) @@ -106,7 +106,7 @@ jobs: make install cd ${{github.workspace}} if: matrix.os == 'windows-2019' - + - name: Build assuan (Linux) run: | git clone --depth 1 --branch libassuan-2.5.6 git://git.gnupg.org/libassuan.git ${{github.workspace}}/third_party/libassuan @@ -127,7 +127,7 @@ jobs: make install cd ${{github.workspace}} if: matrix.os == 'windows-2019' - + - name: Build GpgME (Linux) run: | git clone --depth 1 --branch gpgme-1.22.0 git://git.gnupg.org/gpgme.git ${{github.workspace}}/third_party/gpgme @@ -175,7 +175,6 @@ jobs: echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> ${GITHUB_ENV} if: matrix.os == 'ubuntu-20.04' - - name: Copy Modules & Package (Windows) shell: msys2 {0} run: | @@ -185,7 +184,7 @@ jobs: echo "BUILD_TYPE_LOWER=${BUILD_TYPE,,}" >> ${GITHUB_ENV} echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> ${GITHUB_ENV} if: matrix.os == 'windows-2019' - + - name: Upload Artifact(Linux) uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 1cbe45d9..d28b3847 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -1,16 +1,16 @@ -name: Build & Package +name: Build Release on: push: - branches: [ main, 'develop', 'dev/**' ] + branches: [main] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" pull_request: - branches: [ main, 'develop', 'dev/**' ] + branches: [main] paths-ignore: - - 'resource/lfs/locale/**' - - '**.md' + - "resource/lfs/locale/**" + - "**.md" env: # Customize the CMake build type here (Release, Debug, etc.) @@ -20,7 +20,7 @@ jobs: build: strategy: matrix: - os: [ 'ubuntu-20.04', 'macos-13', 'macos-12', "macos-14", 'windows-2019' ] + os: ["ubuntu-20.04", "macos-13", "macos-12", "macos-14", "windows-2019"] runs-on: ${{ matrix.os }} continue-on-error: true steps: @@ -32,7 +32,7 @@ jobs: - uses: actions/checkout@v4 with: - lfs: 'false' + lfs: "false" submodules: recursive - name: Get Short SHA of Commit @@ -69,13 +69,13 @@ jobs: mkdir -p ~/Library/MobileDevice/Provisioning\ Profiles cp $PP_PATH ~/Library/MobileDevice/Provisioning\ Profiles - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Install Qt6 uses: jurplel/install-qt-action@v3 with: - version: '6.7.2' - cache: 'true' + version: "6.7.2" + cache: "true" if: matrix.os == 'ubuntu-20.04' || matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Install Dependence (macOS) @@ -84,7 +84,7 @@ jobs: brew install ninja libarchive gpgme googletest brew install create-dmg brew link openssl@3 --force - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Set up MinGW (Windows) uses: msys2/setup-msys2@v2 @@ -175,7 +175,7 @@ jobs: sudo ninja install if: matrix.os == 'ubuntu-20.04' - - name: Build & Install Full SDK + - name: Build & Install Full SDK run: | cmake -B ${{github.workspace}}/build-full-sdk -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_FULL_SDK=ON cmake --build ${{github.workspace}}/build-full-sdk --config {{$env.BUILD_TYPE}} -- -v @@ -228,7 +228,7 @@ jobs: xcodebuild -exportArchive -archivePath ${{github.workspace}}/build/GpgFrontend.xcarchive \ -exportOptionsPlist ${{github.workspace}}/build/ExportOptions.plist \ -exportPath ${{github.workspace}}/build/package/ - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Copy Modules into Bundle & Deploy Qt & Code Sign (macOS) run: | @@ -236,7 +236,7 @@ jobs: cmake -E copy_directory ${{github.workspace}}/modules/build/artifacts/modules ${{github.workspace}}/build/package/GpgFrontend.app/Contents/Modules macdeployqt ${{github.workspace}}/build/package/GpgFrontend.app -verbose=2 -appstore-compliant -always-overwrite codesign -s "${{secrets.GPGFRONTEND_XOCDE_CODE_SIGN_IDENTITY}}" -f --deep --options=runtime --timestamp ${{github.workspace}}/build/package/GpgFrontend.app - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Package & Sign App Bundle (macOS) run: | @@ -250,7 +250,7 @@ jobs: ${{github.workspace}}/build/final-artifact/GpgFrontend-${{env.sha_short}}-x86_64.dmg mv ${{github.workspace}}/build/GpgFrontend.app.zip \ ${{github.workspace}}/build/GpgFrontend-${{env.sha_short}}-x86_64.zip - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Notarize Release Build (macOS) run: | @@ -261,8 +261,8 @@ jobs: ${{github.workspace}}/build/GpgFrontend-${{env.sha_short}}-x86_64.zip echo "BUILD_TYPE_LOWER=$(echo ${BUILD_TYPE} | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_ENV} echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> ${GITHUB_ENV} - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + - name: Build GpgFrontend (Linux) # Build your GpgFrontend with the given configuration run: | @@ -291,7 +291,7 @@ jobs: cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_ONLY_APPLICATION=ON .. cmake --build . --config ${{env.BUILD_TYPE}} -- -j 4 if: matrix.os == 'windows-2019' - + - name: Copy Modules & Package (Windows) shell: msys2 {0} run: | @@ -316,7 +316,7 @@ jobs: with: name: gpgfrontend-${{matrix.os}}-${{env.BUILD_TYPE_LOWER}}-${{env.SHORT_SHA}} path: ${{github.workspace}}/build/final-artifact/* - if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' + if: matrix.os == 'macos-13' || matrix.os == 'macos-12' || matrix.os == 'macos-14' - name: Upload Artifact (Windows) uses: actions/upload-artifact@master diff --git a/.github/workflows/release-nightly.yml b/.github/workflows/testing-nightly.yml index 0f06eea3..9a6df0bf 100644 --- a/.github/workflows/release-nightly.yml +++ b/.github/workflows/testing-nightly.yml @@ -1,4 +1,4 @@ -name: Build & Package & Release Nightly +name: Build Nightly on: push: @@ -83,18 +83,32 @@ jobs: - name: Set up MinGW (Windows) uses: msys2/setup-msys2@v2 with: - install: git msys2-devel base-devel binutils mingw-w64-x86_64-toolchain + update: true release: false - if: matrix.os == 'windows-2019' - - - name: Set up Dependence (Windows) - shell: msys2 {0} - run: | - pacman --noconfirm -S --needed mingw-w64-x86_64-gcc mingw-w64-x86_64-make mingw-w64-x86_64-cmake autoconf - pacman --noconfirm -S --needed make texinfo automake zip - pacman --noconfirm -S --needed mingw-w64-x86_64-qt6 mingw-w64-x86_64-icu libintl msys2-runtime-devel gettext-devel - pacman --noconfirm -S --needed mingw-w64-x86_64-ninja mingw-w64-x86_64-gnupg mingw-w64-x86_64-libarchive - pacman --noconfirm -S --needed mingw-w64-x86_64-gtest + cache: true + install: >- + git + msys2-devel + base-devel + binutils + autoconf + make + texinfo + automake + zip + libintl + gettext-devel + msys2-runtime-devel + mingw-w64-x86_64-toolchain + mingw-w64-x86_64-gcc + mingw-w64-x86_64-make + mingw-w64-x86_64-cmake + mingw-w64-x86_64-qt6 + mingw-w64-x86_64-icu + mingw-w64-x86_64-ninja + mingw-w64-x86_64-gnupg + mingw-w64-x86_64-libarchive + mingw-w64-x86_64-gtest if: matrix.os == 'windows-2019' - name: Build gpg-error (Linux) @@ -107,17 +121,6 @@ jobs: cd ${{github.workspace}} if: matrix.os == 'ubuntu-20.04' - - name: Build gpg-error (Windows) - shell: msys2 {0} - run: | - git clone --depth 1 --branch libgpg-error-1.47 git://git.gnupg.org/libgpg-error.git ${{github.workspace}}/third_party/libgpg-error - cd ${{github.workspace}}/third_party/libgpg-error - ./autogen.sh - ./configure --enable-maintainer-mode && make -j4 - make install - cd ${{github.workspace}} - if: matrix.os == 'windows-2019' - - name: Build assuan (Linux) run: | git clone --depth 1 --branch libassuan-2.5.6 git://git.gnupg.org/libassuan.git ${{github.workspace}}/third_party/libassuan @@ -128,17 +131,6 @@ jobs: cd ${{github.workspace}} if: matrix.os == 'ubuntu-20.04' - - name: Build assuan (Windows) - shell: msys2 {0} - run: | - git clone --depth 1 --branch libassuan-2.5.6 git://git.gnupg.org/libassuan.git ${{github.workspace}}/third_party/libassuan - cd ${{github.workspace}}/third_party/libassuan - ./autogen.sh - ./configure --enable-maintainer-mode && make -j4 - make install - cd ${{github.workspace}} - if: matrix.os == 'windows-2019' - - name: Build GpgME (Linux) run: | git clone --depth 1 --branch gpgme-1.22.0 git://git.gnupg.org/gpgme.git ${{github.workspace}}/third_party/gpgme @@ -179,7 +171,7 @@ jobs: - name: Build & Install Full SDK (Windows) shell: msys2 {0} run: | - cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') + cygpath -u ${{github.workspace}} mkdir build-full-sdk && cd build-full-sdk cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_FULL_SDK=ON -DCMAKE_INSTALL_PREFIX=$MSYSTEM_PREFIX .. cmake --build . --config ${{env.BUILD_TYPE}} -- -j 4 @@ -196,7 +188,7 @@ jobs: - name: Build Integrated Modules (Windows) shell: msys2 {0} run: | - cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') + cygpath -u ${{github.workspace}} cd modules mkdir build && cd build cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_STABLE=ON -DCMAKE_INSTALL_PREFIX=./artifacts .. @@ -279,22 +271,22 @@ jobs: - name: Configure CMake & Build Application (Windows) shell: msys2 {0} run: | - cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') + cygpath -u ${{github.workspace}} mkdir build && cd build cmake -G Ninja -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DGPGFRONTEND_BUILD_TYPE_ONLY_APPLICATION=ON .. cmake --build . --config ${{env.BUILD_TYPE}} -- -j 4 if: matrix.os == 'windows-2019' - - name: Get short SHA of Git Commit (Windows) - run: echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV + - name: Generate Env Vars (Windows) + run: | + echo "SHORT_SHA=$("${{ github.sha }}".SubString(0, 8))" >> $env:GITHUB_ENV + echo "BUILD_TYPE_LOWER=$("${{env.BUILD_TYPE}}".ToLower())" >> $env:GITHUB_ENV if: matrix.os == 'windows-2019' - name: Copy Modules & Package (Windows) shell: msys2 {0} run: | - echo "BUILD_TYPE_LOWER=${BUILD_TYPE,,}" >> ${GITHUB_ENV} - echo "SHORT_SHA=`echo ${GITHUB_SHA} | cut -c1-8`" >> ${GITHUB_ENV} - cd $(echo "/${{github.workspace}}" | sed 's/\\/\//g' | sed 's/://') + cygpath -u ${{github.workspace}} mkdir -p build/artifacts/modules cp -r modules/build/artifacts/bin/* build/artifacts/modules cd build @@ -353,7 +345,24 @@ jobs: draft: false prerelease: true body: | - This is a nightly release of the GpgFrontend. - It's unstable compared to the official releases, **use it with caution**! + ### Nightly Release of GpgFrontend + + This is an **unstable nightly build** of GpgFrontend. + It may contain new features or bug fixes that are under testing. + Please note that this version is less stable compared to official + releases and is intended for testing purposes **only**. + + #### Why Nightly Releases? + This nightly release aims to provide users with early access to + features or fixes they urgently need. Given that official releases are + typically published at least two months apart, I understand that the + wait may be too long for some users. + + #### Important Notes: + - For **Windows** users: After downloading, overwrite the contents + of `GpgFrontend/Program/bin` in your installation directory with the + files provided in this nightly release. + - Use this version at your own risk; it is not recommended for + production environments. files: | artifacts/* |