Skip to content

Informational cursor (#1988) #423

Informational cursor (#1988)

Informational cursor (#1988) #423

Workflow file for this run

name: Continuous build
on:
push:
branches:
- master
- 2.2.1
jobs:
BuildLinux:
runs-on: ubuntu-20.04
outputs:
output1: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: '6.6.*'
modules: 'qt5compat'
- name: Qt6 path
run: |
find ${{github.workspace}}/../Qt -type f -iname "*.so"
ls -l ${{github.workspace}}/../Qt
- name: Install Qt and dependencies
run: |
sudo apt-get -y update
sudo apt-get -qq install qtchooser libgl-dev libxcb-cursor0 libmuparser-dev libboost-dev librsvg2-bin libfreetype6-dev libicu-dev pkg-config libfuse2
sudo ln -snf /usr/lib/x86_64-linux-gnu/qtchooser/qt5.conf /usr/lib/x86_64-linux-gnu/qtchooser/default.conf
sudo rm -rf /usr/local/lib/android
find /home/runner/work/LibreCAD/Qt/6.6.3 -iname "libqt*svg*"
- name: Install Clang
run: |
sudo apt-get -qq install clang-10 clang-tools-10
- name: Set Dark splash
# Test setting dark splash screen for `2.2.2_alpha`,
# then switch "Loading..." label text color to white.
# Comment this if `master` is used for releases.
if: github.ref == 'refs/heads/master'
run: |
cp ${{github.workspace}}/desktop/media/splash/librecad01_dark.png ${{github.workspace}}/librecad/res/main/splash_librecad.png
sed -i 's/Qt::black/Qt::white/g' ${{github.workspace}}/librecad/src/main/main.cpp
- name: Build and analyze
run: |
export CC=g++
export ANALYZE="scan-build-10 -o out --use-cc=/usr/bin/clang++ --use-analyzer=/usr/bin/clang++ "
${ANALYZE}qmake6 -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 "[email protected]"
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: |
#find unix/
QT_FILE_DIR="${{github.workspace}}/../Qt" ./CI/build-appimg.sh
mv LibreCAD*.AppImage LibreCAD-`git describe --always`.AppImage
- name: List files
run: |
echo ${{ github.workspace }} && ls ${{ github.workspace }}
shell: bash
- name: Upload artifact
id: artifact-upload-step
uses: actions/upload-artifact@main
with:
name: linuxAssets
path: LibreCAD*.AppImage
retention-days: 2
BuildSnap:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
ref: master
- 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-14
outputs:
output1: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: uninstall p7zip
run: |
brew uninstall p7zip
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: '6.6.*'
modules: 'qt5compat'
- name: Install boost dependencies
run: |
brew install boost
# XProtect can cause random failures if it decides that the DMG we create
# during the packaging phase is malware.
# TODO: Do it in a cleaner way
# Inspiration: https://github.com/servo/servo/pull/30779
- 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
id: artifact-upload-step
uses: actions/upload-artifact@main
with:
name: macOSAssets
path: LibreCAD*.dmg
retention-days: 2
BuildWindows64:
runs-on: windows-2022
outputs:
output1: ${{ steps.artifact-upload-step.outputs.artifact-id }}
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Uninstall incorrect mingw
run: |
choco uninstall mingw --force
choco uninstall strawberryperl --force
- name: Install Qt6
uses: jurplel/install-qt-action@v3
with:
version: '6.6.*'
host: 'windows'
arch: 'win64_mingw'
target: 'desktop'
dir: '..'
install-deps: 'true'
cache: 'false'
cache-key-prefix: 'install-qt-action'
setup-python: 'true'
set-env: 'true'
tools-only: 'false'
extra: '--external 7z'
modules: 'qt5compat'
- name: install mingw-1120
run: |
aqt install-tool windows desktop tools_mingw90
- name: list folders
run: |
where qmake6.exe
where g++.exe
where mingw32-make.exe
- name: Install boost
shell: bash
run: |
curl -# -L -o boost.7z https://boostorg.jfrog.io/artifactory/main/release/1.83.0/source/boost_1_83_0.7z
7z x -o. -y boost.7z
mv boost_1_83_0 ../boost
rm boost.7z
- name: Debugging
if: ${{ always() }}
shell: cmd
run: |
set
echo.
dir c:\
echo.
dir d:\
echo.
dir d:\a
echo.
dir
echo.
dir ..
echo.
dir ..\boost
dir ..\Qt\6.6.3\mingw_64\bin
echo.
dir /b /s ..\Qt
where qmake6.exe
where mingw32-make.exe
where make.exe
where g++
- name: Build
run: |
set PATH=${{ github.workspace }}\Tools\mingw1120_64\bin;${{ github.workspace }}\Qt\6.6.3\mingw_64\bin;%PATH%
copy CI\custom-win.pri custom.pri
copy CI\custom-win-x64.nsh scripts\postprocess-windows\custom.nsh
echo SET:
set
pushd "${{ github.workspace }}\scripts"
build-windows.bat
shell: cmd
- name: Rename installer
run: |
mv generated/LibreCAD-Installer.exe LibreCAD-`git describe --always`-win64.exe
shell: bash
- name: List files
run: |
echo "${{ github.workspace }}"
dir "${{ github.workspace }}"
shell: cmd
- name: Upload artifact
id: artifact-upload-step
uses: actions/upload-artifact@main
with:
name: win64Assets
path: LibreCAD*.exe
retention-days: 2
UpdateAssets:
if: github.repository_owner == 'LibreCAD'
needs: [BuildLinux, BuildMacOS, BuildWindows64, BuildSnap]
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@main
with:
fetch-depth: 0
- name: Delete existing
run: gh release delete "2.2.2_alpha-latest" -y
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Fetch artifacts
uses: actions/download-artifact@main
- name: Upload latest pre-release
uses: softprops/action-gh-release@v2
with:
name: "Continuous Build: latest development"
tag_name: "2.2.2_alpha-latest"
prerelease: true
draft: false
files: |
linuxAssets/LibreCAD*.AppImage
macOSAssets/LibreCAD*.dmg
win64Assets/LibreCAD*.exe
snapAssets/LibreCAD*.snap
LICENSE