winget #875
This file contains hidden or 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: Continuous build | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - 2.2.1 | |
| jobs: | |
| BuildLinux: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Install Qt5 | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.*' | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -qq install \ | |
| libgl-dev libmuparser-dev libboost-dev librsvg2-bin libfreetype6-dev libicu-dev pkg-config libfuse2 | |
| sudo apt-get -qq install clang clang-tools | |
| sudo rm -rf /usr/local/lib/android | |
| - name: Build and analyze | |
| run: | | |
| export CC=g++ | |
| export ANALYZE="scan-build -o out --use-cc=g++ --use-analyzer=/usr/bin/clang++ " | |
| ${ANALYZE}qmake -r librecad.pro CONFIG+=debug_and_release PREFIX=/usr | |
| ${ANALYZE}make release -j$(nproc) | |
| - name: Create report repository | |
| run: | | |
| cd out | |
| find . -mindepth 2 -type f -print -exec mv {} . \; | |
| git config --global user.email "github@librecad.org" | |
| git config --global user.name "GHA CI [bot]" | |
| git config --global init.defaultBranch gh-pages | |
| git init | |
| git add . | |
| git commit -m "latest analyzer report" | |
| - name: Push changes | |
| if: github.repository_owner == 'LibreCAD' | |
| uses: ad-m/github-push-action@master | |
| with: | |
| repository: ${{github.repository_owner}}/static-analyzer-reports | |
| github_token: ${{secrets.LC_PUSH_ANALYZER_REPORT}} | |
| branch: gh-pages | |
| force: true | |
| directory: out | |
| - name: Create AppImage | |
| run: | | |
| ./CI/build-appimg.sh | |
| pwd | |
| echo ${{github.workspace}} | |
| ls ${{github.workspace}}/ | |
| ls ${{github.workspace}}/**.AppImage | |
| ls | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linuxAssets | |
| path: ${{github.workspace}}/LibreCAD*.AppImage | |
| retention-days: 2 | |
| BuildLinuxAarch64: | |
| runs-on: ubuntu-22.04-arm | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Install dependencies | |
| run: | | |
| sudo apt-get -y update | |
| sudo apt-get -qq install libqt5svg5 libqwt-qt5-dev imagemagick | |
| sudo apt-get -qq install qt5-qmake libqt5core5a libqt5gui5 libqt5widgets5 libqt5printsupport5 libqt5svg5-dev \ | |
| libqt5pdf5 libqt5scripttools5 libqt5dbus5 libqt5charts5-dev \ | |
| libgl-dev libmuparser-dev libboost-dev librsvg2-bin libfreetype6-dev libicu-dev pkg-config libfuse2 | |
| sudo rm -rf /usr/local/lib/android | |
| - name: Build | |
| run: | | |
| /usr/lib/qt5/bin/qmake -r librecad.pro CONFIG+=debug_and_release PREFIX=/usr | |
| make release -j$(nproc) | |
| - name: Create AppImage | |
| run: | | |
| ./CI/build-appimg-aarch64.sh | |
| pwd | |
| echo ${{github.workspace}} | |
| ls ${{github.workspace}}/ | |
| ls ${{github.workspace}}/**.AppImage | |
| ls | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: linuxAarch64Assets | |
| path: ${{github.workspace}}/LibreCAD*.AppImage | |
| retention-days: 2 | |
| BuildSnap: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: install snap | |
| uses: samuelmeuli/action-snapcraft@v2 | |
| - name: Create snapcraft | |
| run: | | |
| pwd | |
| ls | |
| ls scripts | |
| bash ./scripts/createSnap.sh | |
| mv librecad*.snap LibreCAD-`git describe --always`.snap | |
| - name: Uploading snap | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: snapAssets | |
| path: ${{github.workspace}}/LibreCAD*.snap | |
| retention-days: 2 | |
| BuildMacOS: | |
| runs-on: macos-15-intel | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Install Qt5 | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.*' | |
| host: 'mac' | |
| target: 'desktop' | |
| arch: 'clang_64' | |
| - name: update Qt5 | |
| run: | | |
| sed -i'' -e 's:isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS):isEmpty("H"):' $Qt5_Dir/mkspecs/features/toolchain.prf | |
| sed -i'' -e 's:error("failed to parse default search paths from compiler output"):LIBRECAD_SDK=:' $Qt5_Dir/mkspecs/features/toolchain.prf | |
| - name: Install dependencies | |
| run: | | |
| rm -f /usr/local/bin/2to3 | |
| brew install boost | |
| - name: Kill XProtectBehaviorService | |
| run: | | |
| echo Killing XProtect. | |
| sudo pkill -9 XProtect >/dev/null || true | |
| - name: Build and packaging | |
| run: | | |
| scripts/build-osx.sh | |
| mv LibreCAD.dmg LibreCAD-`git describe --always`.dmg | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macOSAssets | |
| path: ${{github.workspace}}/LibreCAD*.dmg | |
| retention-days: 2 | |
| BuildMacOSArm64: | |
| runs-on: macos-15 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Install dependencies | |
| run: | | |
| rm -f /usr/local/bin/2to3 | |
| brew install boost qt@5 | |
| echo "/opt/homebrew/opt/qt@5/bin" >> $GITHUB_PATH | |
| - name: update Qt5 | |
| run: | | |
| sed -i'' -e 's:isEmpty(QMAKE_DEFAULT_LIBDIRS)|isEmpty(QMAKE_DEFAULT_INCDIRS):isEmpty("H"):' /opt/homebrew/opt/qt@5/mkspecs/features/toolchain.prf | |
| sed -i'' -e 's:error("failed to parse default search paths from compiler output"):LIBRECAD_SDK=:' /opt/homebrew/opt/qt@5/mkspecs/features/toolchain.prf | |
| - name: Kill XProtectBehaviorService | |
| run: | | |
| echo Killing XProtect. | |
| sudo pkill -9 XProtect >/dev/null || true | |
| - name: Build and packaging | |
| env: | |
| QMAKE_OPTS: QMAKE_APPLE_DEVICE_ARCHS=arm64 | |
| run: | | |
| scripts/build-osx.sh | |
| mv LibreCAD.dmg LibreCAD-`git describe --always`-arm64.dmg | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: macOSArm64Assets | |
| path: ${{github.workspace}}/LibreCAD*.dmg | |
| retention-days: 2 | |
| BuildWindows: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Setup MSVC developer environment (32-bit) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x86 | |
| - name: Install Qt-5.15 (MSVC 2019 32-bit) | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.*' | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win32_msvc2019' | |
| dir: '..' | |
| install-deps: 'true' | |
| cache: 'false' | |
| setup-python: 'true' | |
| set-env: 'true' | |
| aqtversion: '==3.1.*' | |
| py7zrversion: '==0.20.*' | |
| extra: '--external 7z' | |
| - name: Install boost | |
| shell: bash | |
| run: | | |
| curl -# -L -o boost.7z https://archives.boost.io/release/1.87.0/source/boost_1_87_0.7z | |
| 7z x -o. -y boost.7z | |
| mv boost_1_87_0 ../boost | |
| rm boost.7z | |
| - name: Install winget | |
| shell: cmd | |
| run: | | |
| powershell -Command "Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" | |
| winget --version | |
| - name: Configure for MSVC | |
| shell: cmd | |
| run: | | |
| copy CI\custom-win.pri custom.pri | |
| copy CI\custom-win.nsh scripts\postprocess-windows\custom.nsh | |
| winget install --id Microsoft.Sysinternals.Strings --source winget -e | |
| - name: Build and package with script (MSVC-compatible) | |
| shell: cmd | |
| run: | | |
| pushd "${{github.workspace}}\scripts" | |
| build-windows.bat | |
| - name: Rename installer | |
| shell: bash | |
| run: | | |
| mv generated/LibreCAD-*.exe LibreCAD-`git describe --always`-msvc.exe | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: win32Assets | |
| path: ${{github.workspace}}/LibreCAD*.exe | |
| retention-days: 2 | |
| BuildWindows64: | |
| runs-on: windows-2022 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Setup MSVC developer environment (64-bit) | |
| uses: ilammy/msvc-dev-cmd@v1 | |
| with: | |
| arch: x64 | |
| - name: Install Qt-5.15 (MSVC 2019 64-bit) | |
| uses: jurplel/install-qt-action@v3 | |
| with: | |
| version: '5.15.*' | |
| host: 'windows' | |
| target: 'desktop' | |
| arch: 'win64_msvc2019_64' | |
| dir: '..' | |
| install-deps: 'true' | |
| cache: 'false' | |
| setup-python: 'true' | |
| set-env: 'true' | |
| aqtversion: '==3.1.*' | |
| py7zrversion: '==0.20.*' | |
| extra: '--external 7z' | |
| - name: Install boost | |
| shell: bash | |
| run: | | |
| curl -# -L -o boost.7z https://archives.boost.io/release/1.87.0/source/boost_1_87_0.7z | |
| 7z x -o. -y boost.7z | |
| mv boost_1_87_0 ../boost | |
| rm boost.7z | |
| - name: Install winget | |
| shell: cmd | |
| run: | | |
| powershell -Command "Add-AppxPackage -RegisterByFamilyName -MainPackage Microsoft.DesktopAppInstaller_8wekyb3d8bbwe" | |
| winget --version | |
| - name: Configure for MSVC | |
| shell: cmd | |
| run: | | |
| copy CI\custom-win.pri custom.pri | |
| copy CI\custom-win-x64.nsh scripts\postprocess-windows\custom.nsh | |
| winget install --id Microsoft.Sysinternals.Strings --source winget -e | |
| - name: Build and package with script (MSVC-compatible) | |
| shell: cmd | |
| run: | | |
| pushd "${{github.workspace}}\scripts" | |
| build-windows.bat | |
| - name: Rename installer | |
| shell: bash | |
| run: | | |
| mv generated/LibreCAD-*.exe LibreCAD-`git describe --always`-win64-msvc.exe | |
| - name: Upload artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: win64Assets | |
| path: ${{github.workspace}}/LibreCAD*.exe | |
| retention-days: 2 | |
| UpdateAssets: | |
| if: github.repository_owner == 'LibreCAD' | |
| needs: [BuildLinux, BuildLinuxAarch64, BuildMacOS, BuildMacOSArm64, BuildWindows, BuildWindows64, BuildSnap] | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@main | |
| with: | |
| fetch-depth: 0 | |
| ref: 2.2.1 | |
| - name: Fetch artifacts | |
| uses: actions/download-artifact@v4 | |
| - name: Upload latest pre-release | |
| uses: "marvinpinto/action-automatic-releases@latest" | |
| with: | |
| repo_token: "${{secrets.GITHUB_TOKEN}}" | |
| automatic_release_tag: "2.2.1.3_rc-latest" | |
| prerelease: true | |
| draft: false | |
| title: "Release Candidate" | |
| files: | | |
| linuxAssets/LibreCAD*.AppImage | |
| linuxAarch64Assets/LibreCAD*.AppImage | |
| macOSAssets/LibreCAD*.dmg | |
| macOSArm64Assets/LibreCAD*.dmg | |
| win*Assets/LibreCAD*.exe | |
| snapAssets/LibreCAD*.snap | |
| LICENSE |