-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #8 from oblivioncth/dev
Merge to master for release v0.8.1
- Loading branch information
Showing
68 changed files
with
1,251 additions
and
5,906 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,14 @@ | ||
changelog: | ||
exclude: | ||
labels: | ||
- release-pr | ||
categories: | ||
- title: New Features | ||
labels: | ||
- enhancement | ||
- title: Bug Fixes | ||
labels: | ||
- bug | ||
- title: Other Changes | ||
labels: | ||
- "*" |
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,101 @@ | ||
name: Build CLIFp - Windows (Qt 6.3.0) | ||
on: | ||
workflow_call: | ||
secrets: | ||
qt_static_dec_key: | ||
description: 'MEGA decryption key for Qt static install archive URL' | ||
required: true | ||
outputs: | ||
qt_static_artifact_name: | ||
description: "CLIFp (Qt static) build artifact" | ||
value: ${{ jobs.build-clifp.outputs.qt_static_artifact_name }} | ||
env: | ||
qt_install_dir: ${{ github.workspace }}/Qt/Install | ||
qt_download_dir: ${{ github.workspace }}/Qt/Download | ||
clifp_src_suffix: CLIFp/Source | ||
clifp_src_dir: ${{ github.workspace }}/CLIFp/Source | ||
clifp_build_dir: ${{ github.workspace }}/CLIFp/Build | ||
|
||
jobs: | ||
build-clifp: | ||
name: Build CLIFp - Windows (Release) | ||
strategy: | ||
matrix: | ||
qt_linkage: [static] | ||
runs-on: windows-latest | ||
env: | ||
vs_dir: C:/Program Files/Microsoft Visual Studio/2022/Enterprise | ||
cmake_gen: Ninja Multi-Config | ||
outputs: | ||
qt_static_artifact_name: ${{ steps.get_artifact_name.outputs.qt_static_artifact_name }} | ||
steps: | ||
- name: Set matrix derived variables | ||
uses: kanga333/[email protected] | ||
with: | ||
key: ${{ matrix.qt_linkage }} | ||
map: | | ||
{ | ||
"static": { | ||
"qt_install_name": "qt-Production-6.3.0-win32-msvc-x64-static-release.7z", | ||
"qt_install_url": "https://mega.nz/file/J7IxAbYL", | ||
"qt_install_url_key": "${{ secrets.qt_static_dec_key }}", | ||
"artifact_output_var": "qt_static_artifact_name" | ||
} | ||
} | ||
export_to: env,log | ||
- name: Set derived variables with shell because GitHub Actions env context sucks | ||
run: | | ||
echo "qt_install_dest=${{ env.qt_download_dir }}/${{ env.qt_install_name }}" >> $Env:GITHUB_ENV | ||
echo "clifp_package_path=${{ env.clifp_build_dir }}/out/dist" >> $Env:GITHUB_ENV | ||
$clifp_install_path="${{ env.clifp_build_dir }}/out/install" | ||
echo "clifp_install_path=$clifp_install_path" >> $Env:GITHUB_ENV | ||
echo "qt_cmake=${Env:qt_install_dir}/bin/qt-cmake.bat" >> $Env:GITHUB_ENV | ||
- name: Cache Qt Build | ||
id: cache-qt | ||
uses: actions/cache@v3 | ||
with: | ||
path: ${{ env.qt_install_dir }} | ||
key: ${{ env.qt_install_name }} | ||
- name: Install megatools | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: choco install megatools | ||
- name: Create Qt Download Directory | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: New-Item -Path "${{ env.qt_download_dir }}" -ItemType "directory" | ||
- name: Download Qt Install | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: megatools dl "${Env:qt_install_url}#${Env:qt_install_url_key}" --path "${{ env.qt_download_dir }}" | ||
- name: Extract Qt Install | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: 7z x ${{ env.qt_install_dest }} -o${{ env.qt_install_dir }} | ||
- name: Checkout CLIFp | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.clifp_src_suffix }} | ||
fetch-depth: 0 # Required for verbose versioning to work correctly | ||
- name: Build/Install CLIFp | ||
working-directory: ${{ env.clifp_src_dir }} | ||
shell: cmd | ||
run: | | ||
echo "Setup C++ Build Environment..." | ||
CALL "${{ env.vs_dir }}\Common7\Tools\VsDevCmd.bat" -arch=amd64 | ||
echo "Configure CMake using Qt wrapper..." | ||
CALL "${{ env.qt_cmake }}" -G "${{ env.cmake_gen }}" -S "${{ env.clifp_src_dir}}" -B "${{ env.clifp_build_dir }}" | ||
echo "Changing to build directory..." | ||
cd "%clifp_build_dir%" | ||
echo "Building CLIFp release..." | ||
cmake --build . --target all --config Release | ||
echo "Installing CLIFp Release..." | ||
cmake --build . --target install --config Release | ||
echo "Packaging CLIFp..." | ||
cpack -C "Release" | ||
echo "Build complete." | ||
- name: Get CLIFp artifact name | ||
id: get_artifact_name | ||
run: echo "::set-output name=${{ env.artifact_output_var }}::$((Get-ChildItem -Path "${{ env.clifp_package_path }}" -Filter *.zip)[0].BaseName)" | ||
- name: Upload CLIFp build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.get_artifact_name.outputs[env.artifact_output_var] }} | ||
path: ${{ env.clifp_install_path }} | ||
if-no-files-found: error |
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,44 @@ | ||
name: Master pull-request checks | ||
on: | ||
pull_request: | ||
types: [opened, synchronize, reopened] | ||
branches: master | ||
|
||
jobs: | ||
ensure-higher-version: | ||
name: Ensure higher version than last tag has been set | ||
runs-on: windows-latest | ||
env: | ||
clifp_src_suffix: CLIFp/Source/ | ||
clifp_src_dir: ${{ github.workspace }}/CLIFp/Source/ | ||
steps: | ||
- name: Checkout CLIFp | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ${{ env.clifp_src_suffix }} | ||
fetch-depth: 0 # Required for tag search to find previous tag | ||
- name: Compare versions | ||
env: | ||
match_start: set\(CLIFP_BASE_VERSION | ||
match_end: \) | ||
run: | | ||
cd "${{ env.clifp_src_dir }}" | ||
echo "Checking for version tags..." | ||
if(git tag -l v*.*){ | ||
echo "Version tags found, comparing new and last tag..." | ||
$last_tag_version = $(git describe --abbrev=0 --match v*.*).substring(1) | ||
echo "Last tag version: ${last_tag_version}" | ||
$project_lists = Get-Content -Raw CMakeLists.txt | ||
if(!($project_lists -match '(?<=${{ env.match_start }})(.*)(?=${{ env.match_end }})')){ | ||
throw "Could not get project version!" | ||
} | ||
$new_tag_version = $Matches[1].Trim() | ||
echo "New tag version: ${new_tag_version}" | ||
if(!([version]$new_tag_version -gt [version]$last_tag_version)){ | ||
throw "Project version was not increased to be above previous tagged version!" | ||
} | ||
} | ||
else{ | ||
echo "No existing version tags present. Proceeding..." | ||
} | ||
110 changes: 110 additions & 0 deletions
110
.github/workflows/master-pull-request-merge-reaction.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,110 @@ | ||
name: Master pull-request merge reaction | ||
on: | ||
pull_request: | ||
types: [closed] | ||
branches: | ||
- 'master' | ||
env: | ||
ci_bot_username: ObyBotCI | ||
ci_bot_email: [email protected] | ||
clifp_qts_win_artifact_path: ${{ github.workspace }}/CLIFpQtSWin | ||
|
||
jobs: | ||
tag_master_and_sync_dev: | ||
name: Tag master merge commit, FF back to dev | ||
if: github.event.pull_request.merged == true | ||
runs-on: windows-latest | ||
outputs: | ||
version_tag: ${{ steps.tag_master.outputs.new_tag }} | ||
target_fp_version: ${{ steps.check_target_fp.outputs.fp_version }} | ||
steps: | ||
- name: Checkout CLIFp Master | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Setup git user for bot | ||
run: | | ||
git config --global user.name "${{ env.ci_bot_username }}" | ||
git config --global user.email "${{ env.ci_bot_email }}" | ||
- name: Get target FP version | ||
id: check_target_fp | ||
env: | ||
match_start: set\(TARGET_FP_VERSION_PREFIX | ||
match_end: \) | ||
run: | | ||
$project_lists = Get-Content -Raw CMakeLists.txt | ||
if(!($project_lists -match '(?<=${{ env.match_start }})(.*)(?=${{ env.match_end }})')){ | ||
throw "Could not get target FP version!" | ||
} | ||
$target_version = "v$($Matches[1].Trim())" | ||
echo "::set-output name=fp_version::$target_version" | ||
- name: Tag master with new version tag | ||
id: tag_master | ||
env: | ||
match_start: set\(CLIFP_BASE_VERSION | ||
match_end: \) | ||
run: | | ||
$project_lists = Get-Content -Raw CMakeLists.txt | ||
if(!($project_lists -match '(?<=${{ env.match_start }})(.*)(?=${{ env.match_end }})')){ | ||
throw "Could not get base version!" | ||
} | ||
$new_tag = "v$($Matches[1].Trim())" | ||
echo "::set-output name=new_tag::$new_tag" | ||
git tag -a $new_tag -m "Release $new_tag" | ||
git push --tags | ||
- name: Move 'latest' tag | ||
run: | | ||
echo "Checking for 'latest' tag..." | ||
if(git tag -l latest){ | ||
echo "Removing previous 'latest' tag..." | ||
git tag -d latest # Delete tag locally | ||
git push origin :refs/tags/latest # Delete tag remotely | ||
} | ||
else{ | ||
echo "No tag to remove." | ||
} | ||
git tag -a latest -m "Latest Release" | ||
git push origin latest | ||
- name: Fast-forward merge master into to dev | ||
if: always() | ||
run: | | ||
git checkout dev | ||
git merge master --ff-only | ||
git push | ||
build_clifp_release_windows: | ||
name: Build CLIFp Release (Windows) | ||
needs: tag_master_and_sync_dev | ||
if: github.event.pull_request.merged == true | ||
uses: ./.github/workflows/build-clifp-windows.yml | ||
secrets: | ||
qt_static_dec_key: ${{ secrets.QT_WINDOWS_STATIC_DECRYPT_KEY }} | ||
|
||
create-release: | ||
name: Create GitHub release | ||
needs: [build_clifp_release_windows, tag_master_and_sync_dev] | ||
if: github.event.pull_request.merged == true | ||
runs-on: windows-latest | ||
steps: | ||
- name: Set release artifact names | ||
run: | | ||
echo "release_qts_win_package_name=${{ needs.build_clifp_release_windows.outputs.qt_static_artifact_name }}" >> $Env:GITHUB_ENV | ||
- name: Download built static CLIFp artifact (Windows) | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ env.release_qts_win_package_name }} | ||
path: ${{ env.clifp_qts_win_artifact_path }} | ||
- name: Zip up release artifacts | ||
run: | | ||
7z a "${{ env.release_qts_win_package_name }}.zip" "${{ env.clifp_qts_win_artifact_path }}/*" | ||
- name: Generate release | ||
uses: softprops/action-gh-release@v1 | ||
with: | ||
name: "CLIFp Release ${{ needs.tag_master_and_sync_dev.outputs.version_tag }} (Targets FP ${{ needs.tag_master_and_sync_dev.outputs.target_fp_version }})" | ||
tag_name: "${{ needs.tag_master_and_sync_dev.outputs.version_tag }}" | ||
fail_on_unmatched_files: true | ||
generate_release_notes: true | ||
files: | | ||
${{ env.release_qts_win_package_name }}.zip | ||
|
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,31 @@ | ||
name: Pull-request auto-labeler | ||
on: | ||
pull_request: | ||
types: [opened] | ||
|
||
jobs: | ||
label_master_pr: | ||
name: Label master pull-request | ||
if: github.base_ref == 'master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Create label | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: release-pr | ||
label_other_pr: | ||
name: Label other standard pull-requests | ||
if: github.base_ref != 'master' | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Label bugfix PR | ||
if: startsWith(github.head_ref, 'bugfix/') | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: bug | ||
- name: Label feature PR | ||
if: startsWith(github.head_ref, 'feature/') | ||
uses: actions-ecosystem/action-add-labels@v1 | ||
with: | ||
labels: enhancement | ||
|
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,13 @@ | ||
name: CLIFp Push Reaction | ||
on: | ||
workflow_dispatch: | ||
push: | ||
branches-ignore: | ||
- 'master' | ||
|
||
jobs: | ||
trigger-windows-build: | ||
name: Build CLIFp (Windows) | ||
uses: ./.github/workflows/build-clifp-windows.yml | ||
secrets: | ||
qt_static_dec_key: ${{ secrets.QT_WINDOWS_STATIC_DECRYPT_KEY }} |
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,73 @@ | ||
# This file is used to ignore files which are generated | ||
# ---------------------------------------------------------------------------- | ||
|
||
*~ | ||
*.autosave | ||
*.a | ||
*.core | ||
*.moc | ||
*.o | ||
*.obj | ||
*.orig | ||
*.rej | ||
*.so | ||
*.so.* | ||
*_pch.h.cpp | ||
*_resource.rc | ||
*.qm | ||
.#* | ||
*.*# | ||
core | ||
!core/ | ||
tags | ||
.DS_Store | ||
.directory | ||
*.debug | ||
Makefile* | ||
*.prl | ||
*.app | ||
moc_*.cpp | ||
ui_*.h | ||
qrc_*.cpp | ||
Thumbs.db | ||
*.res | ||
*.rc | ||
/.qmake.cache | ||
/.qmake.stash | ||
|
||
# qtcreator generated files | ||
*.pro.user* | ||
*.txt.user* | ||
|
||
# xemacs temporary files | ||
*.flc | ||
|
||
# Vim temporary files | ||
.*.swp | ||
|
||
# Visual Studio generated files | ||
*.ib_pdb_index | ||
*.idb | ||
*.ilk | ||
*.sln | ||
*.suo | ||
*.vcproj | ||
*vcproj.*.*.user | ||
*.ncb | ||
*.sdf | ||
*.opensdf | ||
*.vcxproj | ||
*vcxproj.* | ||
|
||
# MinGW generated files | ||
*.Debug | ||
*.Release | ||
|
||
# Python byte code | ||
*.pyc | ||
|
||
# Binaries | ||
# -------- | ||
*.dll | ||
*.exe | ||
|
Oops, something went wrong.