-
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 v0.1.4
- Loading branch information
Showing
9 changed files
with
73 additions
and
208 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 |
---|---|---|
|
@@ -2,11 +2,8 @@ name: Linux - Build QI-QMP | |
on: | ||
workflow_call: | ||
secrets: | ||
qt_shared_url: | ||
description: 'MEGA Qt shared install archive URL' | ||
required: true | ||
qt_static_url: | ||
description: 'MEGA Qt static install archive URL' | ||
qt_ffynnon_cred: | ||
description: 'Credentials for getting Qt from Ffynnon' | ||
required: true | ||
outputs: | ||
qt_shared_artifact_name: | ||
|
@@ -18,7 +15,6 @@ on: | |
env: | ||
general_download_dir: ${{ github.workspace }}/Download | ||
qt_install_dir: ${{ github.workspace }}/Qt/Install | ||
qt_download_dir: ${{ github.workspace }}/Qt/Download | ||
qi_qmp_src_suffix: QI-QMP/Source | ||
qi_qmp_src_dir: ${{ github.workspace }}/QI-QMP/Source | ||
qi_qmp_build_dir: ${{ github.workspace }}/QI-QMP/Build | ||
|
@@ -38,75 +34,29 @@ jobs: | |
qt_shared_artifact_name: ${{ steps.get_artifact_name.outputs.qt_shared_artifact_name }} | ||
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: | | ||
{ | ||
"shared": { | ||
"qt_install_url": "${{ secrets.qt_shared_url }}", | ||
"artifact_output_var": "qt_shared_artifact_name" | ||
}, | ||
"static": { | ||
"qt_install_url": "${{ secrets.qt_static_url }}", | ||
"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 "qi_qmp_package_path=${{ env.qi_qmp_build_dir }}/out/dist" >> $GITHUB_ENV | ||
qi_qmp_install_path="${{ env.qi_qmp_build_dir }}/out/install" | ||
echo "qi_qmp_install_path=$qi_qmp_install_path" >> $GITHUB_ENV | ||
echo "qt_cmake=$qt_install_dir/bin/qt-cmake" >> $GITHUB_ENV | ||
- name: Cache Qt Build | ||
id: cache-qt | ||
uses: actions/cache@v3 | ||
- name: Install Qt (custom build) | ||
uses: oblivioncth/actions/general/install-and-cache-qt-from-ffynnon@dev | ||
with: | ||
version: 6.4.0 | ||
os: linux | ||
compiler: clang | ||
linkage: ${{ matrix.qt_linkage }} | ||
path: ${{ env.qt_install_dir }} | ||
key: ${{ env.qt_install_url }} | ||
- name: Install megatools | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
env: | ||
mt_build: megatools-1.11.0.20220519-linux-x86_64 | ||
mt_arch_ext: tar.gz | ||
mt_repo: https://megatools.megous.com/builds/builds/ | ||
run: | | ||
curl "$mt_repo/$mt_build.$mt_arch_ext" --output "$general_download_dir/$mt_build.$mt_arch_ext" --create-dirs --location --silent --show-error | ||
cd $general_download_dir | ||
tar xf "$mt_build.$mt_arch_ext" | ||
cd "$mt_build" | ||
cp -p megatools /usr/local/bin | ||
- name: Create Qt Download Directory | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: mkdir -p "${{ env.qt_download_dir }}" | ||
- name: Download Qt Install | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: megatools dl "$qt_install_url" --path "${{ env.qt_download_dir }}" | ||
- name: Determine Qt Install Package Name | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: | | ||
qt_install_name=$(ls "${{ env.qt_download_dir }}" | grep "qt-.*7z") | ||
echo "qt_install_dest=${{ env.qt_download_dir }}/$qt_install_name" >> $GITHUB_ENV | ||
- name: Extract Qt Install | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: 7z x ${{ env.qt_install_dest }} -o${{ env.qt_install_dir }} | ||
credentials: ${{ secrets.qt_ffynnon_cred }} | ||
- name: Install OpenGL lib | ||
run: sudo apt-get install libglu1-mesa-dev | ||
- name: Install XCB Related libs | ||
run: sudo apt-get install libx11-xcb-dev libxkbcommon-dev libxkbcommon-x11-dev libxcb-*-dev | ||
- name: Install Doxygen | ||
env: | ||
doxy_build: doxygen-1.9.4 | ||
doxy_arch_ext: linux.bin.tar.gz | ||
doxy_repo: https://www.doxygen.nl/files | ||
run: | | ||
curl "$doxy_repo/$doxy_build.$doxy_arch_ext" --output "$general_download_dir/$doxy_build.$doxy_arch_ext" --create-dirs --location --silent --show-error | ||
cd $general_download_dir | ||
tar xf "$doxy_build.$doxy_arch_ext" | ||
cd "$doxy_build" | ||
sudo make install | ||
uses: oblivioncth/actions/ubuntu/install-doxygen-from-sourceforge@dev | ||
with: | ||
version: 1.9.5 | ||
- name: Install Graphviz | ||
run: sudo apt-get install graphviz | ||
- name: Install Ninja | ||
|
@@ -141,12 +91,13 @@ jobs: | |
- name: Get QI-QMP artifact name | ||
id: get_artifact_name | ||
run: | | ||
cpack_name=$(find * -type f -name "*.zip") | ||
cpack_name=$(find "${{ env.qi_qmp_package_path }}" -type f -name "*.zip") | ||
artifact_name=$(basename "$cpack_name" .zip) | ||
echo "::set-output name=${{ env.artifact_output_var }}::$artifact_name" | ||
echo "qi_qmp_current_artifact_name=$artifact_name" >> $GITHUB_ENV | ||
echo "qt_${{ matrix.qt_linkage }}_artifact_name=$artifact_name" >> $GITHUB_OUTPUT | ||
- name: Upload QI-QMP build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.get_artifact_name.outputs[env.artifact_output_var] }} | ||
name: ${{ env.qi_qmp_current_artifact_name }} | ||
path: ${{ env.qi_qmp_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 |
---|---|---|
|
@@ -2,11 +2,8 @@ name: Windows - Build QI-QMP | |
on: | ||
workflow_call: | ||
secrets: | ||
qt_shared_url: | ||
description: 'MEGA Qt shared install archive URL' | ||
required: true | ||
qt_static_url: | ||
description: 'MEGA Qt static install archive URL' | ||
qt_ffynnon_cred: | ||
description: 'Credentials for getting Qt from Ffynnon' | ||
required: true | ||
outputs: | ||
qt_shared_artifact_name: | ||
|
@@ -17,7 +14,6 @@ on: | |
value: ${{ jobs.build-qi-qmp.outputs.qt_static_artifact_name }} | ||
env: | ||
qt_install_dir: ${{ github.workspace }}/Qt/Install | ||
qt_download_dir: ${{ github.workspace }}/Qt/Download | ||
qi_qmp_src_suffix: QI-QMP/Source | ||
qi_qmp_src_dir: ${{ github.workspace }}/QI-QMP/Source | ||
qi_qmp_build_dir: ${{ github.workspace }}/QI-QMP/Build | ||
|
@@ -36,51 +32,21 @@ jobs: | |
qt_shared_artifact_name: ${{ steps.get_artifact_name.outputs.qt_shared_artifact_name }} | ||
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: | | ||
{ | ||
"shared": { | ||
"qt_install_url": "${{ secrets.qt_shared_url }}", | ||
"artifact_output_var": "qt_shared_artifact_name" | ||
}, | ||
"static": { | ||
"qt_install_url": "${{ secrets.qt_static_url }}", | ||
"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 "qi_qmp_package_path=${{ env.qi_qmp_build_dir }}/out/dist" >> $Env:GITHUB_ENV | ||
$qi_qmp_install_path="${{ env.qi_qmp_build_dir }}/out/install" | ||
echo "qi_qmp_install_path=$qi_qmp_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 | ||
- name: Install Qt (custom build) | ||
uses: oblivioncth/actions/general/install-and-cache-qt-from-ffynnon@dev | ||
with: | ||
version: 6.4.0 | ||
os: win32 | ||
compiler: msvc | ||
linkage: ${{ matrix.qt_linkage }} | ||
path: ${{ env.qt_install_dir }} | ||
key: ${{ env.qt_install_url }} | ||
- 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}" --path "${{ env.qt_download_dir }}" | ||
- name: Determine Qt Install Package Name | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: | | ||
$qt_install_name=(Get-ChildItem -Path "${{ env.qt_download_dir }}" -Name -Filter qt-*.7z) | ||
echo "qt_install_dest=${{ env.qt_download_dir }}/${qt_install_name}" >> $Env:GITHUB_ENV | ||
- name: Extract Qt Install | ||
if: steps.cache-qt.outputs.cache-hit != 'true' | ||
run: 7z x ${{ env.qt_install_dest }} -o${{ env.qt_install_dir }} | ||
credentials: ${{ secrets.qt_ffynnon_cred }} | ||
- name: Install Doxygen & Graphviz | ||
run: | | ||
choco install doxygen.install --version 1.9.4 | ||
|
@@ -93,13 +59,11 @@ jobs: | |
- name: Build/Install QI-QMP | ||
working-directory: ${{ env.qi_qmp_src_dir }} | ||
shell: cmd | ||
env: | ||
doxygen_root: C:\Program Files\doxygen # Required because of #42 | ||
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.qi_qmp_src_dir}}" -B "${{ env.qi_qmp_build_dir }}" -D QI_QMP_DOCS_TARGET=ON -D Doxygen_ROOT="${{ env.doxygen_root }}" | ||
CALL "${{ env.qt_cmake }}" -G "${{ env.cmake_gen }}" -S "${{ env.qi_qmp_src_dir}}" -B "${{ env.qi_qmp_build_dir }}" -D QI_QMP_DOCS_TARGET=ON" | ||
echo "Changing to build directory..." | ||
cd "%qi_qmp_build_dir%" | ||
echo "Building QI-QMP debug..." | ||
|
@@ -117,10 +81,13 @@ jobs: | |
echo "Build complete." | ||
- name: Get QI-QMP artifact name | ||
id: get_artifact_name | ||
run: echo "::set-output name=${{ env.artifact_output_var }}::$((Get-ChildItem -Path "${{ env.qi_qmp_package_path }}" -Filter *.zip)[0].BaseName)" | ||
run: | | ||
$artifact_name=$((Get-ChildItem -Path "${{ env.qi_qmp_package_path }}" -Filter *.zip)[0].BaseName) | ||
echo "qi_qmp_current_artifact_name=$artifact_name" >> $Env:GITHUB_ENV | ||
echo "qt_${{ matrix.qt_linkage }}_artifact_name=$artifact_name" >> $Env:GITHUB_OUTPUT | ||
- name: Upload QI-QMP build artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ steps.get_artifact_name.outputs[env.artifact_output_var] }} | ||
name: ${{ env.qi_qmp_current_artifact_name }} | ||
path: ${{ env.qi_qmp_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
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
Oops, something went wrong.