-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
103 changed files
with
6,767 additions
and
810 deletions.
There are no files selected for viewing
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Build | ||
on: | ||
workflow_call: | ||
inputs: | ||
v8_version: | ||
type: string | ||
required: true | ||
|
||
src_artifact_name: | ||
type: string | ||
required: true | ||
|
||
artifact_name: | ||
type: string | ||
required: true | ||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
defaults: | ||
run: | ||
shell: pwsh | ||
steps: | ||
|
||
- name: install Onec Platform | ||
uses: alkoleft/onec-setup-build-env-action@develop | ||
with: | ||
type: onec | ||
onec_version: ${{ inputs.v8_version }} | ||
cache: true | ||
env: | ||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }} | ||
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }} | ||
timeout-minutes: 10 | ||
|
||
- name: download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.src_artifact_name }} | ||
|
||
- run: | | ||
mkdir export | ||
mkdir binary | ||
cd export | ||
7z x ../export.7z -y | ||
- name: create IB | ||
run: ibcmd infobase create --db-path=file-db --import=export\configuration --apply --force | ||
timeout-minutes: 5 | ||
|
||
- name: import yaxunit | ||
run: ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export\yaxunit | ||
timeout-minutes: 5 | ||
|
||
- name: import tests | ||
run: ibcmd infobase config import --db-path=file-db --extension=tests export\tests | ||
timeout-minutes: 5 | ||
|
||
- name: save yaxunit | ||
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT binary\yaxunit.cfe | ||
timeout-minutes: 5 | ||
|
||
- name: save tests | ||
run: ibcmd infobase config save --db-path=file-db --extension=tests binary\tests.cfe | ||
timeout-minutes: 5 | ||
|
||
- name: save configuration | ||
run: ibcmd infobase config save --db-path=file-db binary\configuration.cf | ||
timeout-minutes: 5 | ||
|
||
- name: upload-artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: binary\*.* | ||
if-no-files-found: error | ||
retention-days: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Deploy to GitHub Pages | ||
name: Documentation | ||
|
||
on: | ||
push: | ||
|
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,66 @@ | ||
name: Export to designer xml | ||
on: | ||
workflow_call: | ||
inputs: | ||
edt_version: | ||
type: string | ||
required: true | ||
|
||
artifact_name: | ||
type: string | ||
required: true | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: install EDT | ||
uses: IT-Medved/onec-setup-build-env-action@develop | ||
with: | ||
type: edt | ||
edt_version: ${{ inputs.edt_version }} | ||
cache: true | ||
env: | ||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }} | ||
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }} | ||
timeout-minutes: 10 | ||
|
||
- name: convert configuration src | ||
uses: alkoleft/onec-edtcli-command-action@main | ||
with: | ||
export: true | ||
from: fixtures/demo-configuration | ||
to: export/configuration | ||
timeout: 5 | ||
timeout-minutes: 10 | ||
|
||
- name: convert yaxunit src | ||
uses: alkoleft/onec-edtcli-command-action@main | ||
with: | ||
export: true | ||
from: exts/yaxunit | ||
to: export/yaxunit | ||
timeout: 5 | ||
timeout-minutes: 10 | ||
|
||
- name: convert tests src | ||
uses: alkoleft/onec-edtcli-command-action@main | ||
with: | ||
export: true | ||
from: tests | ||
to: export/tests | ||
timeout: 5 | ||
timeout-minutes: 10 | ||
|
||
- run: | | ||
cd export | ||
7za a -t7z ../export.7z ./ | ||
- name: upload-artifact | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: export.7z | ||
if-no-files-found: error | ||
retention-days: 1 |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,64 @@ | ||
name: Build and test | ||
on: | ||
push: | ||
branches: [ feature/**, develop ] | ||
pull_request_target: | ||
branches: [ develop ] | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
checks: write | ||
id-token: write | ||
|
||
jobs: | ||
export_to_designer: | ||
name: Export to designer xml | ||
uses: ./.github/workflows/export-xml.yml | ||
with: | ||
edt_version: 2023.1.2 | ||
artifact_name: designer-src | ||
secrets: inherit | ||
|
||
build_artifacts: | ||
name: Build artifacts | ||
uses: ./.github/workflows/build-on-windows.yml | ||
needs: export_to_designer | ||
with: | ||
v8_version: 8.3.21.1895 | ||
src_artifact_name: designer-src | ||
artifact_name: build-artifacts | ||
secrets: inherit | ||
|
||
tests_linux_ru: | ||
name: Tests Linux 8.3.21.1895 ru_RU | ||
uses: ./.github/workflows/run-tests-linux.yml | ||
needs: build_artifacts | ||
with: | ||
v8_version: 8.3.21.1895 | ||
artifact_name: build-artifacts | ||
secrets: inherit | ||
|
||
tests_linux_en: | ||
name: Tests Linux 8.3.21.1895 en_US | ||
uses: ./.github/workflows/run-tests-linux.yml | ||
if: false | ||
needs: build_artifacts | ||
with: | ||
v8_version: 8.3.21.1895 | ||
artifact_name: build-artifacts | ||
locale: en_US | ||
fail_on_failure: false | ||
secrets: inherit | ||
|
||
tests_windows_ru: | ||
name: Tests Windows 8.3.21.1895 ru_RU | ||
uses: ./.github/workflows/run-tests-windows.yml | ||
needs: build_artifacts | ||
with: | ||
v8_version: 8.3.21.1895 | ||
artifact_name: build-artifacts | ||
secrets: inherit |
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
name: Run tests on Linux | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
v8_version: | ||
description: 'Platform version' | ||
type: string | ||
required: true | ||
|
||
locale: | ||
type: string | ||
required: false | ||
default: ru_RU | ||
|
||
artifact_name: | ||
type: string | ||
required: true | ||
|
||
fail_on_failure: | ||
type: boolean | ||
required: false | ||
default: true | ||
|
||
permissions: | ||
contents: read | ||
checks: write | ||
id-token: write | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }}-${{ inputs.v8_version }}-${{ inputs.locale }}-Linux | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
execute-tests: | ||
runs-on: ubuntu-latest | ||
steps: | ||
|
||
- name: download artifact | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: ${{ inputs.artifact_name }} | ||
path: binary | ||
|
||
- name: prepare | ||
run: | | ||
sudo DEBIAN_FRONTEND=noninteractive apt-get install -y locales | ||
sudo ln -s /usr/lib/x86_64-linux-gnu/libenchant-2.so.2 /usr/lib/libenchant.so.1 | ||
sudo localedef -i ${{ inputs.locale }} -c -f UTF-8 -A /usr/share/locale/locale.alias ${{ inputs.locale }}.UTF-8 | ||
mkdir reports -p | ||
- name: install platform | ||
uses: IT-Medved/onec-setup-build-env-action@develop | ||
with: | ||
type: onec | ||
onec_version: ${{ inputs.v8_version }} | ||
cache: false | ||
env: | ||
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }} | ||
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }} | ||
timeout-minutes: 10 | ||
|
||
- name: install x11 | ||
run: sudo apt-get install -y x11-xserver-utils | ||
continue-on-error: true | ||
timeout-minutes: 5 | ||
|
||
- name: install xserver-dummy | ||
run: sudo apt-get install -y xserver-xorg-video-dummy | ||
timeout-minutes: 5 | ||
|
||
- name: create dummy-config | ||
uses: DamianReeves/write-file-action@master | ||
with: | ||
path: dummy-1920x1080.conf | ||
contents: | | ||
Section "Monitor" | ||
Identifier "Monitor0" | ||
HorizSync 28.0-80.0 | ||
VertRefresh 48.0-75.0 | ||
# https://arachnoid.com/modelines/ | ||
# 1920x1080 @ 60.00 Hz (GTF) hsync: 67.08 kHz; pclk: 172.80 MHz | ||
Modeline "1920x1080_60.00" 172.80 1920 2040 2248 2576 1080 1081 1084 1118 -HSync +Vsync | ||
EndSection | ||
Section "Device" | ||
Identifier "Card0" | ||
Driver "dummy" | ||
VideoRam 256000 | ||
EndSection | ||
Section "Screen" | ||
DefaultDepth 24 | ||
Identifier "Screen0" | ||
Device "Card0" | ||
Monitor "Monitor0" | ||
SubSection "Display" | ||
Depth 24 | ||
Modes "1920x1080_60.00" | ||
EndSubSection | ||
EndSection | ||
- name: start xserver | ||
run: sudo X :99 -config dummy-1920x1080.conf & | ||
timeout-minutes: 5 | ||
|
||
- name: create IB | ||
run: ibcmd infobase create --db-path=file-db --load=binary/configuration.cf --apply --force | ||
timeout-minutes: 5 | ||
|
||
- name: load yaxunit | ||
run: | | ||
ibcmd infobase config load --db-path=file-db --extension=YAXUNIT --force binary/yaxunit.cfe | ||
ibcmd infobase config apply --db-path=file-db --extension=YAXUNIT --force | ||
ibcmd infobase config extension update --db-path=file-db --name=YAXUNIT --safe-mode=no --unsafe-action-protection=no | ||
timeout-minutes: 5 | ||
|
||
- name: load tests | ||
run: | | ||
ibcmd infobase config load --db-path=file-db --extension=tests --force binary/tests.cfe | ||
ibcmd infobase config apply --db-path=file-db --extension=tests --force | ||
ibcmd infobase config extension update --db-path=file-db --name=tests --safe-mode=no --unsafe-action-protection=no | ||
timeout-minutes: 5 | ||
|
||
- name: run server | ||
run: ibsrv --db-path=file-db --daemon | ||
|
||
- name: create test-config | ||
uses: DamianReeves/write-file-action@master | ||
with: | ||
path: unit.json | ||
contents: | | ||
{ | ||
"reportFormat": "jUnit", | ||
"reportPath": "reports/report.xml", | ||
"closeAfterTests": true, | ||
"exitCode": "exit-code.txt", | ||
"logging": { | ||
"console": true | ||
} | ||
} | ||
- name: run tests | ||
run: 1cv8c /WS "http://localhost:8314" /C"RunUnitTests=${{github.workspace}}/unit.json" /DisableStartupDialogs /DisableStartupMessages /DisableUnrecoverableErrorMessage /Out ${{github.workspace}}/output.log | ||
timeout-minutes: 5 | ||
env: | ||
DISPLAY: :99 | ||
LANG: "${{ inputs.locale }}.UTF-8" | ||
|
||
- name: view output | ||
if: always() | ||
run: cat ./output.log | ||
|
||
- name: upload-artifact | ||
uses: actions/upload-artifact@v3 | ||
if: always() | ||
with: | ||
name: Tests report. Linux ${{ inputs.v8_version }} ${{ inputs.locale }} | ||
path: reports/*.* | ||
|
||
- name: Publish Test Report | ||
uses: mikepenz/action-junit-report@v3 | ||
if: always() | ||
with: | ||
job_name: Tests Linux ${{ inputs.v8_version }} ${{ inputs.locale }} | ||
check_name: Tests report. Linux ${{ inputs.v8_version }} ${{ inputs.locale }} | ||
report_paths: reports/report.xml | ||
fail_on_failure: ${{ inputs.fail_on_failure }} | ||
require_passed_tests: true |
Oops, something went wrong.