Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve CI (rewrite RockylLinux CI, Ubuntu CI to GHA) #1803

Merged
merged 40 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
a03215e
Add Ubuntu CI in github vm and rewrite rockylinux CI
MinyazevR Oct 24, 2024
ea52984
Delete unnecessary files
MinyazevR Oct 24, 2024
09a58a9
Set detect_leaks=0 for Ubuntu builds and cut out invalid characters f…
MinyazevR Oct 24, 2024
a6e26df
Format setup_environment.yml
MinyazevR Oct 24, 2024
baefb61
Cleanup
MinyazevR Oct 24, 2024
d14d78d
Change path for QTIFW installation
MinyazevR Oct 24, 2024
694e350
Enable cpu feature sse4.2
MinyazevR Oct 24, 2024
7852dae
Add private headers
MinyazevR Oct 24, 2024
14c7242
Update submodule and enable ASAN_OPTIONS=detect_leaks=1
MinyazevR Oct 24, 2024
573eb63
Add qtwayland dependecies
MinyazevR Oct 24, 2024
868066e
Split the environment for the installer and the build environment for…
MinyazevR Oct 30, 2024
76c1f63
Format
MinyazevR Oct 30, 2024
197807a
Add auto remove script for artifact for next pipeline and add option …
MinyazevR Oct 30, 2024
2dfde73
Switch to boolean type on.workflow_call.inputs
MinyazevR Oct 30, 2024
77cca7f
Add SDK Qt packages for installer environment
MinyazevR Oct 30, 2024
d04dbdb
Add executable bit
MinyazevR Oct 30, 2024
89df0d7
Fix python minor version
MinyazevR Oct 30, 2024
3788c25
Add Qt installation to GITHUB_PATH
MinyazevR Oct 30, 2024
77769ab
Add qtwaylandcompositor module to aqtinstall
MinyazevR Oct 30, 2024
be25e83
Add worflow for install TRIK Studio and switch to macOS-13
MinyazevR Nov 6, 2024
1808d7c
Switch distro rockylinux build to python3.11
MinyazevR Nov 6, 2024
932979e
Add executable bit
MinyazevR Nov 6, 2024
4c2e27a
Change macOS application dir
MinyazevR Nov 6, 2024
f668e7b
Add ldd search for non system lib
MinyazevR Nov 6, 2024
4f2c95d
Change application path
MinyazevR Nov 6, 2024
7b843cd
Install dependencies for install TRIK Studio on macOS
MinyazevR Nov 6, 2024
a645acb
Add step for test interpterer on existing .qrs
MinyazevR Nov 6, 2024
c89c386
Remove previous installation
MinyazevR Nov 6, 2024
c5c080e
Add quotes
MinyazevR Nov 6, 2024
b86e352
Format
MinyazevR Nov 8, 2024
e3787b9
Minor fixes
MinyazevR Nov 10, 2024
cfd667e
Fix codefactor issue
MinyazevR Nov 11, 2024
8646d61
Change environment variable QT_QPA_PLATFORM
MinyazevR Nov 11, 2024
22e03e4
Switch to ofscreen platform
MinyazevR Nov 11, 2024
6629130
Execute only qrs files
MinyazevR Nov 11, 2024
1a1ff35
Switch from altlinux container to alt
MinyazevR Nov 11, 2024
f40f681
Allow execute sudo for root
MinyazevR Nov 11, 2024
af6b02b
Use offscreen only for Linux
MinyazevR Nov 11, 2024
955164d
Temporary run only on Linux
MinyazevR Nov 11, 2024
cdd6315
Switch to valid GHA syntax
MinyazevR Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
204 changes: 204 additions & 0 deletions .github/workflows/common_build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
name: Common CI
on:
push:
branches-ignore:
- 'dependabot**'
tags:
- '*'
paths-ignore:
- '**/lsan.supp'
- 'buildScripts/travis/*'
- 'buildScripts/azure/*'
- 'buildScripts/docker/*'
- 'azure-pipelines.yml'
- '.cirrus.yml'
- '.travis.yml'
- '.mergify.yml'
- 'Brewfile'
- '**/*.html'
- '**/*.txt'
- '**/*.md'
- 'installer/packages/**/meta/prebuild-mac.sh'
- 'installer/packages/**/meta/prebuild-linux-gnu.sh'
- '**/*.dockerfile'
- '**/*.Dockerfile'
- '**/Dockerfile'
- '**/Dockerfile.*'
- 'plugins/robots/checker/scripts/build-checker-installer.sh'
- '.github/workflows/centos.yml'
pull_request:
branches-ignore:
- '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
with:
os: ubuntu-latest
lint: true
build: false
build_installer: false

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

build-macos-debug-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-13
build: true
build_installer: false
config: debug
qmake_extra: "CONFIG+=warn_off CONFIG+=tests CONFIG+=noPch CONFIG+=ccache 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]
uses: ./.github/workflows/setup_environment.yml
with:
os: macos-13
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

install-macos-installer:
needs: build-macos-installer
uses: ./.github/workflows/installer.yml
with:
os: macos-13
artifact_name: macos-13-installer

build-ubuntu-release-tests:
needs: lint
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"
trik_python3_version_minor: 10

build-ubuntu-debug-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
build: true
build_installer: false
config: debug
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=small_debug_info CONFIG+=sanitizer CONFIG+=sanitize_undefined CONFIG+=sanitize_address"
trik_python3_version_minor: 10

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

build-rockylinux-distro-release-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
container_name: rockylinux:8
build: true
build_installer: false
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=sanitizer CONFIG+=sanitize-undefined"
gcc_version: 13
shell: bash -l {0}
trik_python3_version_minor: 11

# Use Python 3.11, as the Python 3.12 package in Rocky Linux AppStream x86_64 crashes
# with a segmentation fault when restarting the interpreter during the import of asyncio
# (specifically when loading _ssl) in PythonQt::init().
build-rockylinux-installer-release-tests:
needs: lint
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
container_name: rockylinux:8
build: true
build_installer: false
qmake_extra: "CONFIG+=tests CONFIG+=noPch CONFIG+=ccache CONFIG+=sanitizer CONFIG+=sanitize-undefined CONFIG+=sanitize_address"
gcc_version: 13
trik_qt_version: 5.15
trik_python3_version_minor: 11
linux_installer_environment: true
shell: bash -l {0}

build-rockylinux-installer:
needs: [build-rockylinux-installer-release-tests]
uses: ./.github/workflows/setup_environment.yml
with:
os: ubuntu-latest
container_name: rockylinux:8
build: true
build_installer: true
tests: true
qmake_extra: "CONFIG+=noPch CONFIG+=ccache CONFIG+=no-sanitizers CONFIG+=warn_off"
gcc_version: 13
trik_qt_version: 5.15
trik_python3_version_minor: 11
linux_installer_environment: true
shell: bash -l {0}
secrets: inherit

install-ubuntu-installer:
needs: [build-rockylinux-installer]
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
artifact_name: ubuntu-latest-installer

install-ubuntu-installer-1-concurrency:
needs: [build-rockylinux-installer]
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
artifact_name: ubuntu-latest-installer
concurrency: 1

install-rockylinux-installer:
needs: [build-rockylinux-installer]
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
container_name: rockylinux:8
artifact_name: ubuntu-latest-installer

install-altlinux-installer:
needs: [build-rockylinux-installer]
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
container_name: alt:latest
artifact_name: ubuntu-latest-installer

install-archlinux-installer:
needs: [build-rockylinux-installer]
uses: ./.github/workflows/installer.yml
with:
os: ubuntu-latest
container_name: archlinux:latest
artifact_name: ubuntu-latest-installer
106 changes: 106 additions & 0 deletions .github/workflows/installer.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,106 @@
name: Installer action

on:
workflow_call:
inputs:
os:
required: true
type: string
container_name:
required: false
type: string
default: ""
artifact_name:
required: true
type: string
concurrency:
required: false
type: number
default: 0
jobs:
job:
defaults:
run:
shell: bash

runs-on: ${{ inputs.os }}
container: ${{ inputs.container_name }}

steps:

- name: Install dependencies
run: |
apt-get update && apt-get -y dist-upgrade && apt-get install -y glibc git-core p7zip curl sudo
sed -i 's/^# \(WHEEL_USERS.*\)/\1/' /etc/sudoers
if: startsWith(inputs.container_name, 'alt')

- name: Install dependencies
run: yum install -y epel-release && yum update -y && yum install -y --setopt=install_weak_deps=False git-core findutils p7zip sudo
if: startsWith(inputs.container_name, 'rocky')

- name: Install dependencies
run: pacman -Sy && pacman -S git p7zip sudo --noconfirm
if: startsWith(inputs.container_name, 'arch')

- name: Install dependencies
run: HOMEBREW_NO_INSTALL_CLEANUP=1 HOMEBREW_NO_AUTO_UPDATE=1 brew install p7zip || brew upgrade p7zip
if: startsWith(inputs.os, 'mac')

- name: Checkout repository
uses: actions/checkout@v4
with:
submodules: recursive
fetch-depth: 1

- name: Download installer artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}

- name: Install trik-studio and dll search
run: |
ls
export UNINSTALL_SCRIPT_PATH=$GITHUB_WORKSPACE/trik_studio_uninstallscript.qs
export INSTALLER_EXT_NAME=$(ls -1d *-installer-* | head -n 1)
export INSTALLER_NAME="${INSTALLER_EXT_NAME%.*}"
buildScripts/github/install_installer_${{ runner.os }}.sh
env:
CONCURRENCY: ${{ inputs.concurrency }}

- name: Reinstall trik-studio and dll search
run: |
export UNINSTALL_SCRIPT_PATH=$GITHUB_WORKSPACE/trik_studio_uninstallscript.qs
export INSTALLER_EXT_NAME=$(ls -1d *-installer-* | head -n 1)
export INSTALLER_NAME="${INSTALLER_EXT_NAME%.*}"
buildScripts/github/install_installer_${{ runner.os }}.sh
env:
CONCURRENCY: ${{ inputs.concurrency }}

- name: Downloads minimal tests
run: |
curl --output tests.7z "https://dl.trikset.com/edu/.solutions20200701/testing_small.7z"
7z x tests.7z || 7za x tests.7z

- name: Run minimal tests
run: |
export QT_QPA_PLATFORM=minimal
TWOD_EXEC_NAME=$(ls -1d "$BIN_DIR"/2D-model* | head -n 1)
for i in "$GITHUB_WORKSPACE"/testing_small/*; do "$TWOD_EXEC_NAME" -b -s 5 "$i"; done

- name: Run minimal JavaScript interpeter tests
run: |
export QT_QPA_PLATFORM=offscreen
TWOD_EXEC_NAME=$(ls -1d "$BIN_DIR"/2D-model* | head -n 1)
for i in "$GITHUB_WORKSPACE"/testing_small/*.qrs; do "$TWOD_EXEC_NAME" --generate-path "$i".js --generate-mode javascript \
-b -s 5 --script-path "$i".js "$i"; done
if: startsWith(inputs.os, 'ubuntu')

- name: Run minimal Python interpeter tests
run: |
export QT_QPA_PLATFORM=offscreen
TRIK_PYTHONPATH_BUNDLE_DIR="$LIB_DIR"/python-runtime
export TRIK_PYTHONPATH=.:"${TRIK_PYTHONPATH_BUNDLE_DIR}/base_library.zip:${TRIK_PYTHONPATH_BUNDLE_DIR}/lib-dynload:${TRIK_PYTHONPATH_BUNDLE_DIR}"
TWOD_EXEC_NAME=$(ls -1d $BIN_DIR/2D-model* | head -n 1)
for i in "$GITHUB_WORKSPACE"/testing_small/*.qrs; do "$TWOD_EXEC_NAME" --generate-path "$i".py \
-b -s 5 --script-path "$i".py "$i"; done
if: startsWith(inputs.os, 'ubuntu')
87 changes: 0 additions & 87 deletions .github/workflows/linux_build.yml

This file was deleted.

Loading
Loading