build: fix lint #142
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
name: release | |
on: | |
workflow_run: | |
workflows: ["development"] | |
types: | |
- completed | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
run-name: ${{ github.event.workflow_run.head_commit.message }} | |
jobs: | |
appimage-upload: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
# Use oldest ubuntu to make AppImage work | |
runs-on: ubuntu-20.04 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.workflow_run.head_sha }} | |
- name: Install Qt | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y qt5-default libqt5svg5-dev | |
- name: Build application | |
run: | | |
cd ${GITHUB_WORKSPACE}/application | |
qmake | |
make -j`nproc` | |
- name: Generate AppImage | |
run: | | |
sudo apt-get install -y libfuse2 | |
cd ${GITHUB_WORKSPACE} && sh ./ci/appimage/bundle.sh | |
mv Dust3D-x86_64.AppImage dust3d-${{ github.event.workflow_run.head_branch }}.AppImage | |
- name: Publish latest build | |
env: | |
MY_EMAIL: ${{ secrets.MY_EMAIL }} | |
UPDATE_REPO_TOKEN: ${{ secrets.UPDATE_REPO_TOKEN }} | |
run: | | |
git config --global user.email "${{ env.MY_EMAIL }}" | |
git config --global user.name "Jeremy HU" | |
git clone https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cd huxingyi.github.io | |
git remote set-url origin https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cp ../dust3d-${{ github.event.workflow_run.head_branch }}.AppImage download/dust3d-latest-preview.AppImage | |
git add download/dust3d-latest-preview.AppImage | |
git commit -m "Update latest build for linux" | |
git push origin HEAD | |
cd ../ | |
- name: Upload AppImage | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dust3d-${{ github.event.workflow_run.head_branch }}.AppImage | |
path: dust3d-${{ github.event.workflow_run.head_branch }}.AppImage | |
win32-msvc-upload: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: windows-2019 | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
ref: ${{ github.event.workflow_run.head_sha }} | |
- name: Set up Visual Studio shell | |
uses: egor-tensin/vs-shell@v2 | |
with: | |
arch: x64 | |
- name: Install Qt | |
# Generated by https://ddalcino.github.io/aqt-list-server/ | |
uses: jurplel/install-qt-action@v3 | |
with: | |
aqtversion: '==2.1.*' | |
version: '5.15.2' | |
host: 'windows' | |
target: 'desktop' | |
arch: 'win64_msvc2019_64' | |
archives: 'qttools qtsvg qtimageformats qtbase opengl32sw' | |
- name: Build application | |
run: | | |
cd $env:GITHUB_WORKSPACE/application | |
qmake -spec win32-msvc | |
nmake -f Makefile.Release | |
- name: Set environment variable | |
run: | | |
set PATH="%PATH%;C:\Program Files\7-Zip" | |
- name: Zip executable | |
run: | | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/application/release/dust3d.exe | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/bin/Qt5Svg.dll | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/bin/Qt5Widgets.dll | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/bin/Qt5Gui.dll | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/bin/Qt5Core.dll | |
7z a Dust3D-win32-x86_64.zip ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/bin/opengl32sw.dll | |
ls "${VCToolsRedistDir}x64" | |
ls "${VCToolsRedistDir}x64/Microsoft.VC142.CRT" | |
7z a Dust3D-win32-x86_64.zip "${VCToolsRedistDir}x64/Microsoft.VC142.CRT/msvcp140.dll" | |
7z a Dust3D-win32-x86_64.zip "${VCToolsRedistDir}x64/Microsoft.VC142.CRT/msvcp140_1.dll" | |
7z a Dust3D-win32-x86_64.zip "${VCToolsRedistDir}x64/Microsoft.VC142.CRT/vcruntime140.dll" | |
7z a Dust3D-win32-x86_64.zip "${VCToolsRedistDir}x64/Microsoft.VC142.CRT/vcruntime140_1.dll" | |
mkdir ${GITHUB_WORKSPACE}/platforms | |
cp ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/plugins/platforms/qwindows.dll ${GITHUB_WORKSPACE}/platforms/qwindows.dll | |
7z a Dust3D-win32-x86_64.zip -r ${GITHUB_WORKSPACE}/platforms/ | |
mkdir ${GITHUB_WORKSPACE}/imageformats | |
cp ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/plugins/imageformats/qjpeg.dll ${GITHUB_WORKSPACE}/imageformats/qjpeg.dll | |
cp ${GITHUB_WORKSPACE}/../Qt/5.15.2/msvc2019_64/plugins/imageformats/qsvg.dll ${GITHUB_WORKSPACE}/imageformats/qsvg.dll | |
7z a Dust3D-win32-x86_64.zip -r ${GITHUB_WORKSPACE}/imageformats/ | |
7z x Dust3D-win32-x86_64.zip -odust3d-${{ github.event.workflow_run.head_branch }} | |
shell: bash | |
- name: Publish latest build | |
env: | |
MY_EMAIL: ${{ secrets.MY_EMAIL }} | |
UPDATE_REPO_TOKEN: ${{ secrets.UPDATE_REPO_TOKEN }} | |
run: | | |
git config --global user.email "${{ env.MY_EMAIL }}" | |
git config --global user.name "Jeremy HU" | |
git clone https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cd huxingyi.github.io | |
git remote set-url origin https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cp ../Dust3D-win32-x86_64.zip download/dust3d-latest-preview.zip | |
git add download/dust3d-latest-preview.zip | |
git commit -m "Update latest build for windows" | |
git push origin HEAD | |
cd ../ | |
- name: Upload zip | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dust3d-${{ github.event.workflow_run.head_branch }} | |
path: dust3d-${{ github.event.workflow_run.head_branch }}/ | |
macos-upload: | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Install Qt | |
run: | | |
HOMEBREW_VERBOSE_USING_DOTS=1 brew reinstall --verbose qt@5 | |
HOMEBREW_VERBOSE_USING_DOTS=1 brew link qt@5 --force | |
export PATH="/usr/local/opt/qt@5/bin:$PATH" | |
- name: Build application | |
run: | | |
cd ${GITHUB_WORKSPACE}/application | |
qmake | |
alias nproc="sysctl -n hw.logicalcpu" | |
make -j`nproc` | |
- name: Generate DMG | |
run: | | |
mv ${GITHUB_WORKSPACE}/application/dust3d.app dust3d-${{ github.event.workflow_run.head_branch }}.app | |
macdeployqt dust3d-${{ github.event.workflow_run.head_branch }}.app -dmg | |
- name: Publish latest build | |
env: | |
MY_EMAIL: ${{ secrets.MY_EMAIL }} | |
UPDATE_REPO_TOKEN: ${{ secrets.UPDATE_REPO_TOKEN }} | |
run: | | |
git config --global user.email "${{ env.MY_EMAIL }}" | |
git config --global user.name "Jeremy HU" | |
git clone https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cd huxingyi.github.io | |
git remote set-url origin https://${{ env.UPDATE_REPO_TOKEN }}@github.com/huxingyi/huxingyi.github.io.git | |
cp ../dust3d-${{ github.event.workflow_run.head_branch }}.dmg download/dust3d-latest-preview.dmg | |
git add download/dust3d-latest-preview.dmg | |
git commit -m "Update latest build for macos" | |
git push origin HEAD | |
cd ../ | |
- name: Upload DMG | |
uses: actions/upload-artifact@v3 | |
with: | |
name: dust3d-${{ github.event.workflow_run.head_branch }}.dmg | |
path: dust3d-${{ github.event.workflow_run.head_branch }}.dmg |