Skip to content

Generalise Text::angle() logic #78

Generalise Text::angle() logic

Generalise Text::angle() logic #78

Workflow file for this run

name: windows
on:
push:
branches: [ "master", "current", "release/*" ]
pull_request:
branches: [ "master", "current", "release/*" ]
env:
APP_NAME: "Qucs-S Simulator"
EXECUTABLE_NAME: "qucs-s"
VERSION: "24.2.1"
PUBLISHER_NAME: "The Qucs Team"
BUILD_TYPE: Release
jobs:
build:
runs-on: windows-2022
strategy:
fail-fast: false
matrix:
environment:
- mingw64
- clang64
- ucrt64
defaults:
run:
shell: msys2 {0}
steps:
- name: Disable autocrlf in Git
shell: pwsh
run: |
git config --global core.autocrlf false
git config --global core.eol lf
- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: 'recursive'
- name: Set up MSYS2 environment
uses: msys2/setup-msys2@v2
with:
msystem: ${{ matrix.environment }}
cache: true
update: true
install: >-
bison
flex
dos2unix
curl
zip
unzip
pacboy: >-
cmake:p
gcc:p
qt6-base:p
qt6-tools:p
qt6-svg:p
make:p
ninja:p
python:p
gperf:p
github-cli:p
- name: Build project with CMake
run: |
cmake.exe -B build/ -G "MinGW Makefiles" -DCMAKE_BUILD_TYPE=${{env.BUILD_TYPE}} -DWITH_QT6=ON
cmake.exe --build build/ -j$(nproc) --config ${{env.BUILD_TYPE}}
- name: Make install
run: |
cd build/ && mingw32-make.exe install DESTDIR=./ -j$(nproc)
cp -rf 'Program Files (x86)/qucs-suite' ./
cd ..
- name: Deploy Qt6 dependencies
run: |
windeployqt-qt6.exe build/qucs-suite/bin/qucs-s.exe --svg --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sactivefilter.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sattenuator.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-sfilter.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-spowercombining.exe --no-translations
windeployqt-qt6.exe build/qucs-suite/bin/qucs-strans.exe --no-translations
- name: Copy non-Qt DLLs to bin directory
run: |
shopt -s extglob
FILES=$(ldd build/qucs-suite/bin/qucs-s.exe | awk '($3 ~ /\/${{ matrix.environment }}\/bin\//) {print $3}')
for file in $FILES; do
if [[ $(basename "$file") != Qt6* ]]; then
cp -r "$file" build/qucs-suite/bin
fi
done
- name: Create zip archive for release
run: |
cd build/qucs-suite
zip -r ../qucs_s_${{ matrix.environment }}_snapshot.zip ./bin ./share
cd ../..
- name: Upload build artifacts
uses: actions/upload-artifact@v4
with:
name: qucs_s_${{ matrix.environment }}
path: build/qucs_s_${{ matrix.environment }}_snapshot.zip
create-release:
runs-on: ubuntu-latest
if: github.event_name == 'push'
needs: build
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download build artifacts
uses: actions/download-artifact@v4
with:
path: ~/artifacts
- name: Check if continuous_build release exists
run: |
if gh release view continuous_build --repo $GITHUB_REPOSITORY &> /dev/null; then
gh release delete continuous_build --repo $GITHUB_REPOSITORY --cleanup-tag --yes
fi
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create GitHub Release
run: |
gh release create continuous_build \
~/artifacts/**/*.zip -p\
--repo $GITHUB_REPOSITORY \
--title "Continuous build" \
--notes "Automated release for commit ${{ github.sha }}"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}