From f94ba6dc6d722ae39b5865c14903c2b18de11b40 Mon Sep 17 00:00:00 2001 From: Leonardo Zide Date: Sun, 2 Oct 2022 14:05:06 -0700 Subject: [PATCH] Update appveyor.yml --- appveyor.yml | 111 +++++++++++++++++++++++++++++++++++---------------- 1 file changed, 77 insertions(+), 34 deletions(-) diff --git a/appveyor.yml b/appveyor.yml index 5293f873..557557ca 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -2,6 +2,8 @@ version: '{branch}.{build}' skip_tags: true image: - Visual Studio 2019 +- Ubuntu1604 +- macos configuration: Release platform: x64 @@ -9,40 +11,81 @@ environment: GITHUB_TOKEN: secure: ZaApxtWM3JA1AdJqs2pv+BCE5XIUrrVKXNy05q8f6f4zRZ7H/lMEJ6gZ1o2yp6NT -before_build: -- call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" -- set PATH=C:\Qt\5.15\msvc2019_64\bin;%PATH% -- git rev-parse --short HEAD > version.txt -- set /p VERSION= < version.txt -- qmake -v -- qmake -tp vc +for: + - + matrix: + only: + - image: Visual Studio 2019 + + before_build: + - call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Auxiliary\Build\vcvars64.bat" + - set PATH=C:\Qt\5.15\msvc2019_64\bin;%PATH% + - git rev-parse --short HEAD > version.txt + - set /p VERSION= < version.txt + - qmake -v + - qmake -tp vc -build: - project: leocad.vcxproj - verbosity: minimal + build: + project: leocad.vcxproj + verbosity: minimal -after_build: -- 7z a symbols.zip build/release/leocad.exe build/release/leocad.pdb -- mkdir appdir -- copy build\release\leocad.exe appdir -- copy docs\readme.md appdir\readme.txt -- appveyor DownloadFile https://github.com/leozide/leocad/releases/download/v19.07.1/Library-20.03.zip -FileName library.zip -- 7z e library.zip -- copy library.bin appdir\\library.bin -- appveyor DownloadFile https://github.com/leozide/povray/releases/download/continuous/povconsole32-sse2.exe -FileName appdir\povconsole32-sse2.exe -- windeployqt appdir\leocad.exe -- copy tools\setup\leocad.nsi . -- copy tools\setup\setup.ico . -- 'copy "%VCToolsRedistDir%\vcredist_x64.exe" appdir' -- '"C:\Program Files (x86)\NSIS\makensis.exe" /V4 /DX64 "/XOutFile LeoCAD-Windows-%VERSION%.exe" leocad.nsi' -- set TRAVIS_TAG=%APPVEYOR_REPO_TAG_NAME% -- set TRAVIS_REPO_SLUG=%APPVEYOR_REPO_NAME% -- set TRAVIS_COMMIT=%APPVEYOR_REPO_COMMIT% -- appveyor DownloadFile https://github.com/probonopd/uploadtool/raw/master/upload.sh -- if not defined APPVEYOR_PULL_REQUEST_NUMBER (bash upload.sh LeoCAD*.exe) + after_build: + - 7z a symbols.zip build/release/leocad.exe build/release/leocad.pdb + - mkdir appdir + - copy build\release\leocad.exe appdir + - copy docs\readme.md appdir\readme.txt + - appveyor DownloadFile https://github.com/leozide/leocad/releases/download/v19.07.1/Library-20.03.zip -FileName library.zip + - 7z e library.zip + - copy library.bin appdir\\library.bin + - appveyor DownloadFile https://github.com/leozide/povray/releases/download/continuous/povconsole32-sse2.exe -FileName appdir\povconsole32-sse2.exe + - windeployqt appdir\leocad.exe + - copy tools\setup\leocad.nsi . + - copy tools\setup\setup.ico . + - 'copy "%VCToolsRedistDir%\vcredist_x64.exe" appdir' + - '"C:\Program Files (x86)\NSIS\makensis.exe" /V4 /DX64 "/XOutFile LeoCAD-Windows-%VERSION%.exe" leocad.nsi' + - set TRAVIS_TAG=%APPVEYOR_REPO_TAG_NAME% + - set TRAVIS_REPO_SLUG=%APPVEYOR_REPO_NAME% + - set TRAVIS_COMMIT=%APPVEYOR_REPO_COMMIT% + - appveyor DownloadFile https://github.com/probonopd/uploadtool/raw/master/upload.sh + - if not defined APPVEYOR_PULL_REQUEST_NUMBER (bash upload.sh LeoCAD*.exe) -artifacts: -- path: symbols.zip - name: symbols -- path: LeoCAD-Windows-$(VERSION).exe - name: leocad + artifacts: + - path: symbols.zip + name: symbols + - path: LeoCAD-Windows-$(VERSION).exe + name: leocad + + - + matrix: + only: + - image: Ubuntu1604 + + before_build: + - PATH=$PATH:$HOME/Qt/5.15 + + build_script: + - qmake PREFIX=/usr + - make + + - + matrix: + only: + - image: macos + + before_build: + - PATH=$PATH:$HOME/Qt/5.15 + + build_script: + - qmake PREFIX=/usr + - make + + after_build: + - cd build/release + - macdeployqt LeoCAD.app -dmg + - mv LeoCAD.dmg LeoCAD-macOS-$(git rev-parse --short HEAD).dmg + - 'curl -s -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/repos/leozide/leocad/commits/master -o repo.txt' + - 'export REMOTE=$(ggrep -Po ''(?<=: \")(([a-z0-9])\w+)(?=\")'' -m 1 repo.txt)' + - export LOCAL=$(git rev-parse HEAD) + - if [[ "$REMOTE" != "$LOCAL" ]]; then echo "Build no longer current. $REMOTE vs $LOCAL - aborting upload."; exit 0; fi; + - wget -c https://github.com/probonopd/uploadtool/raw/master/upload.sh + - bash upload.sh LeoCAD*.dmg*