forked from nickbnf/glogg
-
-
Notifications
You must be signed in to change notification settings - Fork 211
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: split workflow to smaller actions
- Loading branch information
Showing
5 changed files
with
247 additions
and
217 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,123 @@ | ||
name: "Prepare klogg mac packages" | ||
description: "" | ||
inputs: | ||
p12-file-base64: | ||
required: true | ||
p12-password: | ||
required: true | ||
appstore-connect-username: | ||
required: true | ||
appstore-connect-password: | ||
required: true | ||
|
||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Mac prepare codesign | ||
id: prepare-codesign | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: apple-actions/import-codesign-certs@v1 | ||
with: | ||
p12-file-base64: ${{ inputs.p12-file-base64 }} | ||
p12-password: ${{ inputs.p12-password }} | ||
|
||
- name: Mac deploy Qt | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
macdeployqt ./output/klogg.app -always-overwrite -verbose=2 | ||
- name: Mac deploy Qt fixing | ||
if: ${{ matrix.config.artifacts_id == 'qt5' }} | ||
shell: sh | ||
run: | | ||
python2 $KLOGG_BUILD_ROOT/macdeployqtfix.py $KLOGG_BUILD_ROOT/output/klogg.app/Contents/MacOS/klogg $Qt5_DIR | ||
- name: Mac deploy Qt fixing | ||
if: ${{ matrix.config.artifacts_id == 'qt6' }} | ||
shell: sh | ||
run: | | ||
python2 $KLOGG_BUILD_ROOT/macdeployqtfix.py $KLOGG_BUILD_ROOT/output/klogg.app/Contents/MacOS/klogg $Qt6_DIR | ||
- name: Set packaging env | ||
shell: sh | ||
run: | | ||
echo "KLOGG_CODESIGN=Developer ID Application: Anton Filimonov (GAW773U324)" >> $GITHUB_ENV | ||
echo "KLOGG_INSTALLERSIGN=Developer ID Installer: Anton Filimonov (GAW773U324)" >> $GITHUB_ENV | ||
echo "KLOGG_DMG=klogg-${{ env.KLOGG_VERSION }}-OSX-${{ matrix.config.package_suffix }}.dmg" >> $GITHUB_ENV | ||
echo "KLOGG_PKG=klogg-${{ env.KLOGG_VERSION }}-OSX-${{ matrix.config.package_suffix }}.pkg" >> $GITHUB_ENV | ||
- name: Mac codesign binaries | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
codesign -v -f -o runtime --deep --timestamp -s "${{ env.KLOGG_CODESIGN }}" ./output/klogg.app; | ||
- name: Mac pack dmg | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
cpack --verbose -G "DragNDrop" | ||
- name: Mac codesign dmg | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
mv ./packages/klogg-${{ env.KLOGG_VERSION }}-OSX.dmg ./packages/${{ env.KLOGG_DMG }} | ||
codesign -v -f -o runtime --timestamp -s "${{ env.KLOGG_CODESIGN }}" ./packages/${{ env.KLOGG_DMG }} | ||
- name: "Mac build pkg" | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
mkdir -p pkg_resources/en.lproj | ||
cp ../COPYING pkg_resources/en.lproj | ||
cp ../packaging/description.txt pkg_resources/en.lproj | ||
sed -e s/%klogg_version%/${{ env.KLOGG_VERSION }}/ -e s/%klogg_pkg%/klogg-${{ env.KLOGG_VERSION }}-OSX.pkg/ ../packaging/osx/distribution.xml > distribution.xml | ||
pkgbuild --component ./output/klogg.app --install-location /Applications --version ${{ env.KLOGG_VERSION }} --sign "${{ env.KLOGG_INSTALLERSIGN }}" --timestamp ./output/klogg-${{ env.KLOGG_VERSION }}-OSX.pkg | ||
productbuild --package-path ./output --distribution distribution.xml --resources ./pkg_resources --sign "${{ env.KLOGG_INSTALLERSIGN }}" --timestamp ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-product.pkg | ||
pkgutil --expand ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-product.pkg ./output/klogg_product_pkg | ||
pkgutil --flatten ./output/klogg_product_pkg ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-flatten.pkg | ||
productsign --sign "${{ env.KLOGG_INSTALLERSIGN }}" --timestamp ./output/klogg-${{ env.KLOGG_VERSION }}-OSX-flatten.pkg ./packages/${{ env.KLOGG_PKG }} | ||
- name: "Mac notarize DMG" | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: variar/xcode-notarize@v1.0.3 | ||
with: | ||
verbose: true | ||
product-path: "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}" | ||
primary-bundle-id: "dev.filimonov.klogg" | ||
appstore-connect-username: ${{ inputs.appstore-connect-username }} | ||
appstore-connect-password: ${{ inputs.appstore-connect-password }} | ||
|
||
- name: "Mac staple DMG" | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: devbotsxyz/xcode-staple@v1 | ||
with: | ||
product-path: "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_DMG }}" | ||
|
||
- name: "Mac notarize PKG" | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: variar/xcode-notarize@v1.0.3 | ||
with: | ||
verbose: true | ||
product-path: "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}" | ||
primary-bundle-id: "dev.filimonov.klogg" | ||
appstore-connect-username: ${{ inputs.appstore-connect-username }} | ||
appstore-connect-password: ${{ inputs.appstore-connect-password }} | ||
|
||
- name: "Mac staple PKG" | ||
if: ${{ github.event_name != 'pull_request' }} | ||
uses: devbotsxyz/xcode-staple@v1 | ||
with: | ||
product-path: "${{ env.KLOGG_BUILD_ROOT }}/packages/${{ env.KLOGG_PKG }}" | ||
|
||
- name: Mac symbols | ||
shell: sh | ||
run: | | ||
cd $KLOGG_BUILD_ROOT | ||
cp -a ./output/klogg.dSym ./packages/klogg-${{ matrix.config.package_suffix }}.dSym | ||
cp -a ./output/klogg.app ./packages/klogg-${{ matrix.config.package_suffix }}.app |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: "Prepare windows packages" | ||
description: "" | ||
inputs: | ||
s3-key-id: | ||
required: true | ||
s3-secret: | ||
required: true | ||
s3-bucket: | ||
required: true | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: Setup codesing env | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: sh | ||
run: | | ||
echo "CS_CLIENT_S3_KEY_ID=${{ inputs.s3-key-id }}" >> $GITHUB_ENV | ||
echo "CS_CLIENT_S3_SECRET=${{ inputs.s3-secret }}" >> $GITHUB_ENV | ||
echo "CS_CLIENT_S3_BUCKET=${{ inputs.s3-bucket }}" >> $GITHUB_ENV | ||
- name: Win codesign executables | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: cmd | ||
run: | | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\klogg.exe | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\klogg_portable.exe | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\klogg_crashpad_handler.exe | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\klogg_minidump_dump.exe | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\tbb12.dll | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\tbbmalloc.dll | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\output\tbbmalloc_proxy.dll | ||
|
||
- name: Win portable | ||
shell: cmd | ||
run: | | ||
packaging\windows\prepare_release.cmd | ||
- name: Win installer | ||
uses: joncloud/makensis-action@v3.3 | ||
with: | ||
script-file: klogg.nsi | ||
arguments: "-DVERSION=%KLOGG_VERSION% -DPLATFORM=%KLOGG_ARCH%" | ||
|
||
- name: Win package | ||
shell: cmd | ||
run: | | ||
md %KLOGG_BUILD_ROOT%\packages | ||
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-portable.zip %KLOGG_BUILD_ROOT%\packages\ /y | ||
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-pdb.zip %KLOGG_BUILD_ROOT%\packages\ /y | ||
xcopy klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-setup.exe %KLOGG_BUILD_ROOT%\packages\ /y | ||
- name: Win codesign installer | ||
if: ${{ github.event_name != 'pull_request' }} | ||
shell: cmd | ||
run: | | ||
packaging\windows\codesign_client.exe --debug %KLOGG_BUILD_ROOT%\packages\klogg-%KLOGG_VERSION%-%KLOGG_ARCH%-setup.exe | ||
21 changes: 19 additions & 2 deletions
21
.github/actions/prepare-boost/action.yml → .github/actions/agent-setup/action.yml
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: "Create a package" | ||
description: "Creates a package from build output" | ||
runs: | ||
using: "composite" | ||
steps: | ||
- name: package | ||
if: ${{ matrix.config.cpack_gen }} | ||
shell: sh | ||
run: | | ||
docker run -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && cpack -G ${{ matrix.config.cpack_gen }} " | ||
docker run --env KLOGG_VERSION=$KLOGG_VERSION -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && mv ./packages/klogg-$KLOGG_VERSION-Linux.${{ matrix.config.package_suffix }} ./packages/klogg-$KLOGG_VERSION-${{ matrix.config.artifacts_id }}.${{ matrix.config.package_suffix }}" | ||
docker run --env KLOGG_VERSION=$KLOGG_VERSION -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && mv ./packages/klogg-$KLOGG_VERSION-Linux.${{ matrix.config.package_suffix }}.sha256 ./packages/klogg-$KLOGG_VERSION-${{ matrix.config.artifacts_id }}.${{ matrix.config.package_suffix }}.sha256" | ||
- name: Check package | ||
if: ${{ matrix.config.check_command }} | ||
shell: sh | ||
run: | | ||
docker run --rm -v "$KLOGG_WORKSPACE/$KLOGG_BUILD_ROOT/packages":/usr/local ${{ matrix.config.check_container }} /bin/bash -c "${{ matrix.config.check_command }}" | ||
- name: Linux AppImage | ||
if: ${{ matrix.config.os == 'ubuntu_appimage' }} | ||
shell: sh | ||
run: | | ||
docker run --device /dev/fuse --privileged --env KLOGG_VERSION=$KLOGG_VERSION -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && ../packaging/linux/appimage/generate_appimage.sh" | ||
- name: Copy sym | ||
shell: sh | ||
run: | | ||
docker run -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local/build_root && cp ./output/klogg.sym ./packages/klogg_${{ matrix.config.artifacts_id }}.sym" | ||
- name: Copy deps | ||
if: ${{ matrix.config.os == 'ubuntu_appimage' }} | ||
shell: sh | ||
run: | | ||
docker run -v "$KLOGG_WORKSPACE":/usr/local ${{ matrix.config.container }} /bin/bash -c "cd /usr/local && tar -czvf ./build_root/packages/klogg_deps.tar.gz ./cpm_cache" |
Oops, something went wrong.