Skip to content

Commit

Permalink
Merge branch 'release/24.05'
Browse files Browse the repository at this point in the history
  • Loading branch information
alkoleft committed May 31, 2024
2 parents e51c92b + 5ec3a40 commit 97b554a
Show file tree
Hide file tree
Showing 148 changed files with 4,050 additions and 1,386 deletions.
4 changes: 2 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<!-- Важно: Пожалуйста, перед созданием PR создайте проблему (issue) -->
<!-- Любые изменения необходимо описать и при необходимостиобсудить, прежде чем продолжить. Невыполнение этого требования может привести к отклонению запроса на включение. -->
<!-- Любые изменения необходимо описать и при необходимости обсудить, прежде чем продолжить. Невыполнение этого требования может привести к отклонению запроса на включение. -->

## Описание изменний
## Описание изменений

<!-- Разместите здесь краткое описание изменений -->

Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/build-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build release
on:
push:
tags:
- '*'

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

permissions:
contents: write

jobs:
export_to_designer:
name: Export to designer xml
uses: ./.github/workflows/step-export-xml.yml
with:
edt_version: 2023.1.2
artifact_name: designer-src
engine_only: true
secrets: inherit

build_artifacts:
runs-on: ubuntu-latest
needs: export_to_designer

steps:
- name: install 8.3.21.1895
uses: alkoleft/onec-setup-build-env-action@develop
with:
type: onec
onec_version: 8.3.21.1895
cache: true
env:
ONEC_USERNAME: ${{ secrets.ONEC_USERNAME }}
ONEC_PASSWORD: ${{ secrets.ONEC_PASSWORD }}
timeout-minutes: 10

- name: download artifact
uses: actions/download-artifact@v4
with:
name: designer-src
- name: extract artifacts
run: |
mkdir export
cd export
7z x ../export.7z -y
- name: create IB
run: ibcmd infobase create --db-path=file-db
timeout-minutes: 5

- name: import yaxunit
run: ibcmd infobase config import --db-path=file-db --extension=YAXUNIT export/yaxunit
timeout-minutes: 5

- name: save yaxunit
run: ibcmd infobase config save --db-path=file-db --extension=YAXUNIT YAxUnit-${{ needs.export_to_designer.outputs.yaxunit_version }}.cfe
timeout-minutes: 5

- name: Release
uses: softprops/action-gh-release@v2
if: ${{ success() }}
with:
draft: true
files: YAxUnit-*.cfe
fail_on_unmatched_files: true
generate_release_notes: true
append_body: false
name: Версия ${{ needs.export_to_designer.outputs.yaxunit_version }}
token: ${{ secrets.GITHUB_TOKEN }}

2 changes: 1 addition & 1 deletion .github/workflows/deploy-documentation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Download bsl doc
run: curl -L https://github.com/alkoleft/bsldoc/releases/download/0.1.0/bsldoc-0.1.0.jar --output ./bsldoc.jar && chmod +7 ./bsldoc.jar
- name: Generate API documentation
Expand Down
69 changes: 34 additions & 35 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,67 @@
name: Build and test
on:
push:
branches: [ feature/**, develop ]
branches:
- feature/**
- develop

pull_request_target:
branches: [ develop ]

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

permissions:
contents: read
contents: write
checks: write
id-token: write

jobs:
export_to_designer:
name: Export to designer xml
uses: ./.github/workflows/export-xml.yml
uses: ./.github/workflows/step-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
uses: ./.github/workflows/step-build-artifacts-windows.yml
needs: export_to_designer
with:
v8_version: 8.3.21.1895
secrets: inherit

tests_linux_ru:
name: Tests Linux 8.3.21.1895 ru_RU
uses: ./.github/workflows/run-tests-linux.yml
if: github.ref == 'refs/heads/develop'

tests_windows:
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-windows.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit

tests_linux_en:
name: Tests Linux 8.3.21.1895 en_US
uses: ./.github/workflows/run-tests-linux.yml
if: github.ref == 'refs/heads/develop'
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: en_US
secrets: inherit

tests_windows_ru:
name: Tests Windows 8.3.21.1895 ru_RU
uses: ./.github/workflows/run-tests-windows.yml

tests_linux:
strategy:
fail-fast: false
matrix:
v8_version:
- 8.3.21.1895
locale:
- ru_RU
- en_US
uses: ./.github/workflows/step-run-tests-linux.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: ru_RU
v8_version: ${{ matrix.v8_version }}
locale: ${{ matrix.locale }}
secrets: inherit
tests_windows_en:
name: Tests Windows 8.3.21.1895 en_US
uses: ./.github/workflows/run-tests-windows.yml
needs: build_artifacts
with:
v8_version: 8.3.21.1895
locale: en_US
secrets: inherit
29 changes: 29 additions & 0 deletions .github/workflows/sq-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Анализ в SonarQube (pull-request)

on:
- pull_request
# - pull_request_target Не поддерживается 1CDevFlow/sonar-quality-gate и sonarqube-community-branch-plugin, необходимо доработать action
jobs:
SonarScanner:
runs-on: ubuntu-latest
steps:
- name: Checkout PR
uses: actions/checkout@v4
with:
# Для поддержки pull_request и pull_request_target
# https://github.com/android-password-store/Android-Password-Store/pull/1247
ref: refs/pull/${{ github.event.number }}/merge
fetch-depth: 0

# https://docs.sonarqube.org/latest/analysis/pull-request/
- name: Analyze (pull-request)
uses: 1CDevFlow/sonar-quality-gate@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GIT_URL: "https://api.github.com"
GIT_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_URL: https://sonar.openbsl.ru
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
GITHUB_REPOSITORY: bia-technologies/yaxunit
CI_MERGE_REQUEST_IID: ${{ github.event.number }}
DEBUG: ${{ runner.debug }}
8 changes: 5 additions & 3 deletions .github/workflows/sq.yml
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
name: sq-analyze

on: [push, pull_request]
on:
- push
# - pull_request

jobs:
SonarScanner:
runs-on: ubuntu-latest
if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name == github.event.repository.full_name
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
repository: ${{ github.event.workflow_run.head_repository.full_name }}
ref: ${{ github.event.workflow_run.head_branch }}
Expand All @@ -31,7 +33,7 @@ jobs:
id: extract_version

- name: Setup sonarqube
uses: warchant/setup-sonar-scanner@v3
uses: warchant/setup-sonar-scanner@v8

# Анализ проекта в SonarQube (ветка)
- name: Анализ в SonarQube (branch)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ jobs:
timeout-minutes: 10

- name: download artifact
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: ${{ inputs.src_artifact_name }}

Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
timeout-minutes: 5

- name: upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: binary\*.*
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,29 +9,55 @@ on:
artifact_name:
type: string
required: true

engine_only:
type: boolean
required: false
default: false
outputs:
yaxunit_version:
value: ${{ jobs.export.outputs.yaxunit_version }}

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

jobs:
build:
export:
runs-on: ubuntu-latest
outputs:
yaxunit_version: ${{ steps.extract_version.outputs.version }}
steps:
- uses: actions/checkout@v3

- name: Checkout PR
if: github.event_name == 'pull_request_target' || github.event_name == 'pull_request'
uses: actions/checkout@v4
with:
# Для поддержки pull_request и pull_request_target
# https://github.com/android-password-store/Android-Password-Store/pull/1247
ref: refs/pull/${{ github.event.number }}/merge

- name: Checkout ${{github.ref}}
if: github.event_name == 'push'
uses: actions/checkout@v4

- name: Extract version
shell: bash
run: echo "version=$(cat ./exts/yaxunit/src/Configuration/Configuration.mdo | grep -oP '(?<=<version>)[\d.]+')" >> $GITHUB_OUTPUT
id: extract_version

- name: install EDT
uses: IT-Medved/onec-setup-build-env-action@develop
uses: alkoleft/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
timeout-minutes: 30

- name: convert configuration src
if: ${{ !inputs.engine_only }}
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
Expand All @@ -50,6 +76,7 @@ jobs:
timeout-minutes: 10

- name: convert tests src
if: ${{ !inputs.engine_only }}
uses: alkoleft/onec-edtcli-command-action@main
with:
export: true
Expand All @@ -63,7 +90,7 @@ jobs:
7za a -t7z ../export.7z ./
- name: upload-artifact
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: export.7z
Expand Down
35 changes: 35 additions & 0 deletions .github/workflows/step-publish-artifacts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Run tests on Linux

on:
workflow_call:
inputs:
artifact_name:
type: string
required: false
default: build-artifacts

permissions:
contents: write

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
publish:
runs-on: ubuntu-latest
steps:

- name: download artifact
uses: actions/download-artifact@v4
with:
name: ${{ inputs.artifact_name }}
path: binary
- name: Release
uses: softprops/action-gh-release@v2
with:
draft: true
files: binary/YAxUnit.cfe
generate_release_notes: true
append_body: false
token: ${{ secrets.GITHUB_TOKEN }}
Loading

0 comments on commit 97b554a

Please sign in to comment.