Skip to content

Commit

Permalink
Update action config
Browse files Browse the repository at this point in the history
  • Loading branch information
cgxxv committed Mar 17, 2024
1 parent e12859b commit 823b5cd
Show file tree
Hide file tree
Showing 4 changed files with 73 additions and 62 deletions.
64 changes: 35 additions & 29 deletions .github/qt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,27 @@ jobs:
qt:
- version: 6.5.3
modules: qtwebengine qtwebchannel qtpositioning
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 } # Experimental!
- { sys: clang64, env: clang-x86_64 } # Experimental!
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
make
pacboy: >-
toolchain:p
cmake:p
ninja:p
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
Expand All @@ -30,46 +50,32 @@ jobs:
with:
fetch-depth: 1

- name: Set up Qt environment
shell: powershell
run: |
$QtVersion = "${{ matrix.qt.version }}"
$QtBaseDir = "${{ github.workspace }}\..\Qt\$QtVersion"
$QtArch = Get-ChildItem -Path $QtBaseDir -Directory | Where-Object { $_.Name -like 'msvc*' } | Select-Object -ExpandProperty Name
$QtInstallDir = "${{ github.workspace }}\..\Qt\$QtVersion\$QtArch\lib\cmake"
# $QtInstallDir = (Get-ChildItem -Path "${{ github.workspace }}\..\Qt\$QtVersion\" | Where-Object { $_.PSIsContainer -and $_.Name -match 'msvc.*' } | Select-Object -ExpandProperty FullName) + '\lib\cmake'
$CMakeBuildType = "Release"
Write-Output "QT_VERSION=$QtVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "CMAKE_PREFIX_PATH=$QtInstallDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
Write-Output "CMAKE_BUILD_TYPE=$CMakeBuildType" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
- name: Build Msvc
shell: powershell
- name: Build Windows
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}\lib\cmake
CMAKE_BUILD_TYPE: Release
run: |
# Get-ChildItem -Path "${{ github.workspace }}\.."
# Get-ChildItem -Path "$QtBaseDir"
# Get-ChildItem -Path "$QtInstallDir"
# Get-ChildItem
mkdir build
cd build
cmake ..
Get-ChildItem
cmake -G Ninja ..
ls -al
cmake --build .
Get-ChildItem
ls -al
make
cd ..
Get-ChildItem build
ls -al build
- name: Package Application
run: |
cd build
$os = ${{ matrix.os }} -replace "-latest", ""
$repositoryName = ${{ github.repository }} -replace ".*/", ""
$zipfile = ${repositoryName}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
Compress-Archive -Path ${repositoryName}.exe -DestinationPath ${zipfile}
Move-Item ${zipfile} ..
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
zip -r ${zipfile} ${repository_name}.exe
mv ${zipfile} ..
cd ..
Get-ChildItem
ls -al
echo "${zipfile}" > assets.txt
- name: Create a Release
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qt-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ jobs:
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
macdeployqt ${repository_name}.app -always-overwrite
zip -r ${zipfile} ${repository_name}.app
mv ${zipfile} ../..
cd ../..
Expand Down
1 change: 1 addition & 0 deletions .github/workflows/qt-ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@ jobs:
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
linuxdeployqt ${repository_name} -appimage
zip -r ${zipfile} ${repository_name}
mv ${zipfile} ..
cd ..
Expand Down
69 changes: 36 additions & 33 deletions .github/workflows/qt-windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,27 +18,7 @@ jobs:
qt:
- version: 6.5.3
modules: qtwebengine qtwebchannel qtpositioning
include:
- { sys: mingw64, env: x86_64 }
- { sys: mingw32, env: i686 }
- { sys: ucrt64, env: ucrt-x86_64 } # Experimental!
- { sys: clang64, env: clang-x86_64 } # Experimental!
defaults:
run:
shell: msys2 {0}
steps:
- uses: msys2/setup-msys2@v2
with:
msystem: ${{matrix.sys}}
update: true
install: >-
git
make
pacboy: >-
toolchain:p
cmake:p
ninja:p
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
Expand All @@ -50,32 +30,55 @@ jobs:
with:
fetch-depth: 1

- name: Build Windows
# - name: Set up Qt environment
# shell: powershell
# run: |
# $QtVersion = "${{ matrix.qt.version }}"
# $QtBaseDir = "${{ github.workspace }}\..\Qt\$QtVersion"
# $QtArch = Get-ChildItem -Path $QtBaseDir -Directory | Where-Object { $_.Name -like 'msvc*' } | Select-Object -ExpandProperty Name
# $QtInstallDir = "${{ github.workspace }}\..\Qt\$QtVersion\$QtArch\lib\cmake"
# # $QtInstallDir = (Get-ChildItem -Path "${{ github.workspace }}\..\Qt\$QtVersion\" | Where-Object { $_.PSIsContainer -and $_.Name -match 'msvc.*' } | Select-Object -ExpandProperty FullName) + '\lib\cmake'
# $CMakeBuildType = "Release"
# Write-Output "QT_VERSION=$QtVersion" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Write-Output "CMAKE_PREFIX_PATH=$QtInstallDir" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Write-Output "CMAKE_BUILD_TYPE=$CMakeBuildType" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append

- name: Build Msvc
shell: powershell
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}\lib\cmake
CMAKE_BUILD_TYPE: Release
run: |
# Get-ChildItem -Path "${{ github.workspace }}\.."
# Get-ChildItem -Path "$QtBaseDir"
# Get-ChildItem -Path "$QtInstallDir"
# Get-ChildItem
mkdir build
cd build
cmake -G Ninja ..
ls -al
cmake --build .
ls -al
make
cmake ..
Get-ChildItem
cmake --build . --config ${env:CMAKE_BUILD_TYPE}
Get-ChildItem
cd ..
ls -al build
Get-ChildItem build
- name: Package Application
shell: powershell
env:
QT_VERSION: ${{ matrix.qt.version }}
CMAKE_PREFIX_PATH: ${{ env.Qt6_DIR }}\lib\cmake
CMAKE_BUILD_TYPE: Release
run: |
cd build
os=$(echo "${{ matrix.os }}" | sed 's/-latest//')
repository_name=$(basename ${{ github.repository }})
zipfile=${repository_name}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
zip -r ${zipfile} ${repository_name}.exe
mv ${zipfile} ..
$os = ${{ matrix.os }} -replace "-latest", ""
$repositoryName = ${{ github.repository }} -replace ".*/", ""
$zipfile = ${repositoryName}-${os}-${{ matrix.arch }}-${{ github.run_number }}.zip
windeployqt ${env:CMAKE_BUILD_TYPE}\${repositoryName}.exe
Compress-Archive -Path ${env:CMAKE_BUILD_TYPE} -DestinationPath ${zipfile}
Move-Item ${zipfile} ..
cd ..
ls -al
Get-ChildItem
echo "${zipfile}" > assets.txt
- name: Create a Release
Expand Down

0 comments on commit 823b5cd

Please sign in to comment.