Skip to content

Commit

Permalink
Merge branch 'master' into print_text_block
Browse files Browse the repository at this point in the history
  • Loading branch information
iakov authored Oct 23, 2024
2 parents 4180c34 + 1387445 commit b7af2ec
Show file tree
Hide file tree
Showing 58 changed files with 1,935 additions and 290 deletions.
9 changes: 9 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,3 +38,12 @@ updates:
directory: "/"
schedule:
interval: "weekly"

- package-ecosystem: "pip"
directory: "/installer/packages/trik-studio/ru.qreal.root.trik.core/meta/"
schedule:
interval: "weekly"
groups:
pip-dependencies:
patterns:
- "*"
29 changes: 12 additions & 17 deletions .github/workflows/linux_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
- 'dependabot**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/setup_environment.yml
Expand All @@ -40,38 +44,29 @@ jobs:
build: false
build_installer: false

build-ubuntu-release-ccache:
build-ubuntu-release-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
build: true
build_installer: false
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
tests: true

build-ubuntu-debug-ccache:
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent"

build-altlinux-release-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
container_name: "altlinux/base:latest"
build: true
build_installer: false
config: debug
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address"
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent"
tests: true

build-ubuntu-release-tests:
needs: build-ubuntu-release-ccache
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
build: true
build_installer: false
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
executor: time

build-ubuntu-debug-tests:
needs: build-ubuntu-debug-ccache
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
Expand Down
35 changes: 10 additions & 25 deletions .github/workflows/macos_build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
name: macOS CI

on:
push:
branches-ignore:
Expand Down Expand Up @@ -31,6 +32,10 @@ on:
- 'dependabot**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/setup_environment.yml
Expand All @@ -40,41 +45,19 @@ jobs:
build: false
build_installer: false

build-macos-release-ccache:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-12
executor: "time"
build: true
build_installer: false
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
tests: true

build-macos-debug-ccache:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-12
executor: "time"
build: true
build_installer: false
config: debug
qmake_extra: "CONFIG+=warn_off CONFIG+=noPch CONFIG+=ccache CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address"
tests: true

build-macos-release-tests:
needs: build-macos-release-ccache
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-12
executor: "time"
build: true
build_installer: false
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
trik-python3-version-minor: "11"

build-macos-debug-tests:
needs: build-macos-debug-ccache
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-12
Expand All @@ -83,6 +66,7 @@ jobs:
build_installer: false
config: debug
qmake_extra: "CONFIG+=warn_off CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=silent CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address"
trik-python3-version-minor: "11"

build-macos-installer:
needs: [build-macos-debug-tests, build-macos-release-tests]
Expand All @@ -93,5 +77,6 @@ jobs:
build: true
build_installer: true
qmake_extra: " CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=silent CONFIG+=warn_off"
trik-python3-version-minor: "11"
tests: true
secrets: inherit
17 changes: 9 additions & 8 deletions .github/workflows/rockylinux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,10 @@ on:
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
lint:
uses: ./.github/workflows/setup_environment.yml
Expand All @@ -54,11 +58,6 @@ jobs:

steps:

- name: Cancel Previous Workflow Runs
uses: n1hility/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Install packages
run: |
yum install -y epel-release # for ccache and p7zip
Expand Down Expand Up @@ -121,7 +120,7 @@ jobs:
run: echo PATH="$PATH"

- name: ccache
uses: hendrikmuhs/[email protected].13
uses: hendrikmuhs/[email protected].14

- name: Check available tools
run: |
Expand All @@ -138,7 +137,9 @@ jobs:
timeout-minutes: 1
run: |
cd ${{ env.BUILD_DIR }}
qmake $GITHUB_WORKSPACE/studio.pro CONFIG+=release CONFIG+=tests PYTHON3_VERSION_MINOR=${{ matrix.python-minor }} CONFIG+=noPch CONFIG+=ccache CONFIG+=sanitizer CONFIG+=sanitize-undefined
qmake $GITHUB_WORKSPACE/studio.pro CONFIG+=release CONFIG+=tests \
PYTHON_VERSION=3.${{ matrix.python-minor }} PYTHON_DIR=$(python-3.${{ matrix.python-minor }}-config --prefix) \
CONFIG+=noPch CONFIG+=ccache CONFIG+=sanitizer CONFIG+=sanitize-undefined
- name: QMake all
timeout-minutes: 5
Expand Down Expand Up @@ -172,7 +173,7 @@ jobs:
run: |
echo "$PATH"
echo ------
cd ${{ env.BUILD_DIR }}/bin/release
cd ${{ env.BUILD_DIR }}/bin
env QT_QPA_PLATFORM=minimal python3 "${GITHUB_WORKSPACE}/buildScripts/tests/fieldstest.py" ./2D-model "${GITHUB_WORKSPACE}/testing_small"
- name: Build installer
Expand Down
49 changes: 35 additions & 14 deletions .github/workflows/setup_environment.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
name: Set up Action

on:
workflow_call:
inputs:
Expand Down Expand Up @@ -48,6 +48,10 @@ on:
required: false
type: string
default: "./run-simulator-tests.sh"
container_name:
required: false
type: string
default: ""

jobs:
job:
Expand All @@ -56,11 +60,16 @@ jobs:
shell: bash

runs-on: ${{ inputs.os }}
container:
image: ${{ inputs.container_name }}
options: >
-v ${{ github.workspace }}:${{ github.workspace }}
-w ${{ github.workspace }}
steps:
- name: Cancel Previous Workflow Runs
uses: n1hility/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install dependencies
run: apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git
if: startsWith(inputs.container_name, 'altlinux') == true

- name: Configure git
run: |
Expand Down Expand Up @@ -88,36 +97,49 @@ jobs:
- name: Restore cache
uses: actions/cache@v4
with:
path: ${{ github.workspace }}/.ccache/${{ inputs.os }}-${{ inputs.config }}
key: ccache-${{ inputs.os }}-${{ inputs.config }}-${{ inputs.qmake_extra }}-${{ github.sha }}
path: ${{ github.workspace }}/.ccache/${{ inputs.os }}-c${{ inputs.container_name }}-${{ inputs.config }}
key: ccache-c${{ inputs.container_name }}-${{ inputs.os }}-${{ inputs.config }}-${{ inputs.qmake_extra }}-${{ github.sha }}
restore-keys: |
ccache-${{ inputs.os }}-${{ inputs.config }}-${{ inputs.qmake_extra }}-
ccache-${{ inputs.os }}-${{ inputs.config }}-
ccache-${{ inputs.os }}-
ccache-c${{ inputs.container_name }}-${{ inputs.os }}-${{ inputs.config }}-${{ inputs.qmake_extra }}
ccache-c${{ inputs.container_name }}-${{ inputs.os }}-${{ inputs.config }}
ccache-c${{ inputs.container_name }}-${{ inputs.os }}
if: ${{ inputs.build == 'true' }}

- name: Build
run: buildScripts/github/build.sh
env:
TRIK_QT_VERSION: ${{ inputs.trik-qt-version }}
TRIK_PYTHON3_VERSION_MINOR: ${{ inputs.trik-python3-version-minor }}
CCACHE_DIR: ${{ github.workspace }}/.ccache/${{ inputs.os }}-${{ inputs.config }}
CCACHE_DIR: ${{ github.workspace }}/.ccache/${{ inputs.os }}-c${{ inputs.container_name }}-${{ inputs.config }}
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache.conf
PROJECT: "studio"
CONFIG: ${{ inputs.config }}
EXECUTOR: ${{ inputs.executor }}
QMAKE_EXTRA: ${{ inputs.qmake_extra }}
TESTS: ${{ inputs.tests }}
if: ${{ inputs.build == 'true' }}

- name: Save build cache
uses: actions/cache/save@v4
with:
path: ${{ github.workspace }}/.ccache/${{ inputs.os }}-c${{ inputs.container_name }}-${{ inputs.config }}
key: ccache-c${{ inputs.container_name }}-${{ inputs.os }}-${{ inputs.config }}-${{ inputs.qmake_extra }}-${{ github.sha }}
if: ${{ inputs.build == 'true' }}

- name: Run tests
run: ${{ inputs.executor }} buildScripts/github/run_tests.sh
env:
TRIK_PYTHON3_VERSION_MINOR: ${{ inputs.trik-python3-version-minor }}
TESTS: ${{ inputs.tests }}
if: ${{ inputs.build == 'true' }}

- name: Build Installer
run: |
BRANCH_NAME=${BRANCH_NAME//\//-}
${{ inputs.executor }} env CONFIG=${{ inputs.config }} buildScripts/github/test.sh && buildScripts/github/build_installer.sh
env:
TRIK_QT_VERSION: ${{ inputs.trik-qt-version }}
TRIK_PYTHON3_VERSION_MINOR: ${{ inputs.trik-python3-version-minor }}
CCACHE_DIR: ${{ github.workspace }}/.ccache/${{ inputs.os }}-${{ inputs.config }}
CCACHE_DIR: ${{ github.workspace }}/.ccache/${{ inputs.os }}-c${{ inputs.container_name }}-${{ inputs.config }}
CCACHE_CONFIGPATH: ${{ github.workspace }}/ccache.conf
PROJECT: "studio"
CONFIG: ${{ inputs.config }}
Expand All @@ -140,4 +162,3 @@ jobs:
installer/*.run
installer/*.dmg
if: ${{ inputs.build_installer == 'true' }}

23 changes: 11 additions & 12 deletions .github/workflows/windows_build_with_installer.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ on:
- 'dependabot**'
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
build:
runs-on: windows-latest
Expand All @@ -41,15 +45,15 @@ jobs:
- qt-version: '5.12'
mingw-version: '7.3'
mingw-short-version: '73'
python-version: '3.8'
python-version: '3.11'
mingw-bitness: '64'
deploy-installer: true

- qt-version: '5.15'
mingw-version: '8.1'
mingw-bitness: '64'
mingw-short-version: '81'
python-version: '3.8'
python-version: '3.11'
# deploy-installer: true


Expand All @@ -58,12 +62,7 @@ jobs:
shell: msys2 {0}

steps:

- name: Cancel Previous Workflow Runs
uses: n1hility/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}


- name: Setup msys2
uses: msys2/setup-msys2@v2
with:
Expand Down Expand Up @@ -138,7 +137,7 @@ jobs:
timeout-minutes: 1
run: |
cd ${{ env.BUILD_DIR }}
qmake $GITHUB_WORKSPACE/studio.pro -spec win32-g++ CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=tests CONFIG+=noPch PYTHON_PATH="${pythonLocation}" # CONFIG+=silent
qmake $GITHUB_WORKSPACE/studio.pro -spec win32-g++ CONFIG+=release CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=tests CONFIG+=noPch PYTHON_PATH="${pythonLocation}" PYTHON_VERSION=${{matrix.python-version}}
- name: QMake all
timeout-minutes: 5
Expand All @@ -162,7 +161,7 @@ jobs:
- name: Prepare all dlls
if: false
run: |
for file in $(ls ${{ env.BUILD_DIR }}/bin/release/*.exe || :) ; do windeployqt --release $file ; done
for file in $(ls ${{ env.BUILD_DIR }}/bin/*.exe || :) ; do windeployqt --release $file ; done
- name: Download tests
run: |
Expand All @@ -177,15 +176,15 @@ jobs:
run: |
echo "$PATH"
echo ------
cd ${{ env.BUILD_DIR }}/bin/release
cd ${{ env.BUILD_DIR }}/bin
python "${{ github.workspace }}\buildScripts\tests\fieldstest.py" 2D-model.exe "${{ github.workspace }}\testing_small"
- name: Push binaries
if: false
uses: actions/upload-artifact@v4
with:
name: binaries-${{ matrix.qt-version}}
path: ${{ env.BUILD_DIR }}/bin/release
path: ${{ env.BUILD_DIR }}/bin

- name: Build installer
run: |
Expand Down
Loading

0 comments on commit b7af2ec

Please sign in to comment.