Skip to content

Commit

Permalink
Feature/git release manager +semver:skip (#91)
Browse files Browse the repository at this point in the history
* Переезд на паттерн "Посетитель" (#4)

* Добавил пакет с контрактом паттерна "Посетитель", на который переведу AST

* migration to Visitor.NET 2.0.0

* базис внедрения шаблона Посетитель

* move folder

* merge

* small refactoring + two nodes

* fix build

* Новая система адресации инструкций (#21)

* initial of the branch

* контракт адреса

* Переезд на .NET 7 (#24)

* обновление sdk в проекте

* обновление sdk в ci

* переход на json raw string literal

* обновление nuget пакетов

* Генерация отчёта о покрытии на уровне конфигурации проекта

coverlet-coverage/coverlet#1391

* Генерация отчёта о покрытии на уровне конфигурации проекта

coverlet-coverage/coverlet#1391

* versioning

* Update Readme.md

* draft алгоритма работы коллекции

* Использование последних наворотов шарпа (#26)

* versioning

* enabling implicit usings (#25)

* local scoped namespaces (#27)

* after merge

* разработка алгоритма вставки в коллекцию

* пакетная вставка

* доработка алгоритма вставки

* индексатор

* прямая итерация над коллекцией

* важная доработка вставки - сгенерированный адрес проставляется инструкции, больше не требуется создавать адрес для создания инструкции

* переименовал сущность адреса

* доработка массовой вставки

* алгоритм удаления инструкции

* unit tests

* more tests

* переписал новые визиторы на AddressedInstructions

* удаление конструкта "номер инструкции"

* допиливание работы с Label.cs

* удаление конструкта номера из алгоритмов инструкций

* прогон инструкций в виртуальной машине по адресу

* переписывание алгоритмов инструкций на работу с адресами

* текущая реализация не требует такой сложной конструкции инструкции возврата

* remove unused

* подправил контракт AST

* block statement

* Proper HasReturnStatementImplementation

* removed unused code

* перегруппировка

* address system refactoring

* HashedAddress.cs fix

* AddressedInstructions.cs fix

* introducing brand new visitor architecture

* unary expression visitor

* refactoring + error removal

* Simple.cs fix

* BinaryExpression refactoring

* move AddressedInstructions.cs back

* remove unused

* as string code gen

* Constant.cs refactoring

* доработка генерации существующих функций ExpressionInstructionProvider.cs

* ArrayLiteral.cs visit

* TypeStatement.cs fix

* InsideLoopStatement.cs visit

* ExpressionStatement.cs visit

* ReturnStatement.cs visit

* Label.cs fix

* remove redunant override

* Property.cs refactoring

* ObjectLiteral.cs + FunctionDeclaration.cs visitor refactoring & decoupling

* WhileStatement.cs visit refactoring

* IfStatement.cs refactoring with visitor

* IfStatement.cs fix

* ConditionalExpression.cs visit fix

* AssignmentExpression.cs visitor

* fix

* fix tests

* ComplexLiteral.cs

* AssignmentExpression visit fix

* Исправление некорректной грамматики (#28)

* new grammar.txt content

* format grammar.txt

* grammar fix

* MemberExpression.cs visiting

* refactoring

* fix

* replacement function in AddressedInstructions.cs

* AssignmentExpression visiting fix

* fix

* call expr print

* fix parser

* parser fix 2

* restructuring

* script body visit fix

* formatting

* parser fix

* refactoring

* semantic assertion draft

* break support in if statatement

* enum rename

* rename

* exceptions excluded from codecov

* some semantic analysis rework

* removed some tests

* supress code cov

* suppress

* ReturnStatement.cs semantic

* renane

* parser fix

* rename

* move

* mv SemanticChecker.cs

* new visitor

* region

* SymbolTableBuilder.cs completed

* module refactoring

* removed symbol table construction from parsing

* SymbolTableInitializer fix

* integration with symbol table initializer

* refactoring

* DeclarationVisitor.cs

* usage of decl visitor

* fix recursion

* - Visiting type decl
- New type symbol
- Removed types dict from symbol table

* fix

* small fix

* update  nuget

* symbol refactoring

* some work stuck long time ago

* symbol state

* предварительная версия инициализатора имён

* fix ci

* complete type loading system rework

* type resolving example

* refactoring of default js types consuming and custom types resolving

* fix function codegen bug - end label was not emitted

* type domain refactored

* pre-load built types before reference resolving

* fix bug in object type ref resolving

* hierarchy enhancement

* guard of type duplicates and built-in types declaration

* initialized/declared type symbols

* some new checks

* more refac

* proper render of type values

* guard declarations from duplicates

* do not return null

* binary and unary expressions check

* fix bug sequence has no elements

* guard against no initializer

* formatting

* there is not symbol without initializer thus symbol cannot be not initialized

* working with assignments

* checking access expressions

* check object literal without methods

* реструктуризация сервисов посетителей

* рефакторинг после реструктуризации

* удалил ненавистный Utils

* рефакторинг объектного типа

* сохранение функций в хранилище, для которых не был сразу выведен возвращаемый тип, чтобы впоследствии его вычислить

* call expr check v1

* fix

* перенос проверок функции статическим анализом

* Починил бекенд при работе с анонимными массивами и объектами

* доработка вывода типов

* поправил вывод типов в части необработанных функций

* обновление версий экшенов

* вторая волна обновлений

* upd workflows

* global using visitor.net

* fix func decl gen

* Revert "fix func decl gen"

This reverts commit ef97623.

* visit fix

* Имеет ли функция пустое тело

* исправил ошибку кодогенерации if statement при отсутствии else блока

* базовая кодогенерация для вызова функции без учета метода объекта

* доработка вывода типов

* починил статический анализ доступа к элементу массива по индексу

* fix

* rename to hydrascript

* #15 - удалил методы из объекта

* #15 - удалил концепцию метода из бекенда

* #15 - удалил FunctionType.cs

* #15 - статический анализ вызова метода

* #15 - кодогенерация вызова метода

* #15 - актуализация лексической структуры

* #15 - доработка "забытого" статического анализа

* #15 - поправил кодген if-else

* rm

* #15 - если у функции не прописан тип и нет return'ов, то она void

* #15 - корректировка примеров

* #23 - рабочий пример

* Feature/net 8 (#62)

* #50 - .NET 8

* #44 - mac m1

* upd Readme.md

* #32 - CommandLineSettings.cs теперь обычный dto с опциями (#63)

* Update develop.yml - накинул фиксированных permissions

* Add unique Guid check to HashAddress.Equals (#65)

* Add unique Guid check to HashAddress.Equals

* Update develop.yml - накинул фиксированных permissions

---------

Co-authored-by: Степан <[email protected]>

* Update develop.yml

* Feature/nrt (#66)

* #46 - nrt 1

* #46 - nrt 2

* #46 - nrt 3

* #46 - after merge

* #46 - fix

* Feature/lexer issue 58 (#67)

* fix warnings

* #58 - feature

* #58 - tests

* #58 - fix tests

* рефакторинг структуры проекта (#68)

* #31 - non code elements

* #31 - samples

* #31 - structure refac

* #31 - one more file

* rm cobertura

* new ignore rule

* Обновление Visitor.NET (#69)

* minor fix

* #31 - visitor.NET upgrade

* #59 - переход на IReadOnlyList (#70)

* #31 - change nullability of Parent

* #31 unbound ast node from segment

* #59 - переход на IReadOnlyList

* Draft: Выделение поддоменов (#72)

* #31 - IAbstractSyntaxTreeNode.cs

* #31 - tree internal

* #31 - separate ast from backend

* #31 - segment

* #31 - separate ast from backend 2

* #31 - value dto converter

* #31 - удалил Type из TypeValue

* #31 - fix test

* #31 - symbol contracts

* #31 - tuple -> dto

* #31 - End is property

* mv

* #31 - backend mv

* #31 - backend subdomain

* #31 - scope dto for ast

* #31 - rename

* #31 - rename

* #31 - ISymbolTable -> Scope

* #31 - SymbolTableStorage.cs

* #31 - fix bug

* #31 - remove IR from codegen

* Переход на чистую архитектуру и System.CommandLine (#73)

* #51 - Скелет Луковой Архитектуры

* #51 - удалил мусор

* #51 - перенос backend

* #51 - fix

* #51 - перенос FrontEnd

* #51 - Перенос IR

* #51 - перенос StaticAnalysis

* #51 - перенос Code Generation

* #51 - code gen di refac

* #51 - fix

* #51 - fix

* #51 - static analysis di refac

* #51 - fix

* #51 fix

* #51 - fix

* #51 - fix

* #51 - nuget upgrade

* #51 - infrastructure layer

* #42 - внедрил system command line

* di fix

* #51 - fix

* #47 - интеграционные тесты

* #47 - ci cd

* change ci cd setup

* update Readme.md

* Feature/generated lexer (#77)

* #57 - абстракция IStructure.cs

* #57 - token types provider

* #57 - DI refactoring

* #57 - json highlight

* #57 - абстракция IGeneratedRegexContainer

* fix

* #57 - SG project

* #57 - fix SG launch

* #57 - tests

* #57 - удаление динамического построения RegEx

* #57 - убрал лишнее из TokenType

* #57 - тест на проверку подстановки

* fix

* upd cvrg info

* Перевод на Source Gen Json (#80)

* #45 - тестовый workflow для проверки AOT publish на инфре GitHub Actions

* #45 - перевёл бекенд на json source gen

* fix

* #45 - перевёл SG на json source gen

* #45 - перевёл Infrastructure на json source gen

* Revert "#45 - тестовый workflow для проверки AOT publish на инфре GitHub Actions"

This reverts commit 3014c53.

* Актуализация Readme и перенос файла грамматики в более подходящее место

* small fix - return exit code

* важное уточнение в Readme.md

* logo

* re-arrange

* fix typo in logo

* Merge pull request #83

* Перейти на FrozenDictionary в Structure.

* Убран пробел.

* I have read the CLA Document and I hereby sign the CLA

* Remove cla (#85)

* removed cla

* fix

* #48 - внедрение GitVersion (#86)

* #48 - init GitVersion.yml

* #48 - внедрение git-version в ci-cd

* #48 - upload build

* #48 - use version option

* #48 - fix version

* #48 - push builds only for dev

* test

* fix

* fix

* fix

* fix

* #48 - пуш тега на мерже в мастер

* #48 - временное отключение релиз воркфлоу

* убрал codecov для master - в нём нет смысла, так как подстановка данных все равно происходит руками +semver:skip

* #48 - исключение release ветки из Develop Workflow

* #48 - вернул release.yml

* #48 - новый Release Workflow

---------

Co-authored-by: Sergey Nazarov <[email protected]>
Co-authored-by: Georgy Levchenko <[email protected]>
  • Loading branch information
3 people authored Aug 11, 2024
1 parent 9c83de8 commit b6555ba
Show file tree
Hide file tree
Showing 377 changed files with 7,508 additions and 6,305 deletions.
29 changes: 0 additions & 29 deletions .github/workflows/cla.yml

This file was deleted.

87 changes: 54 additions & 33 deletions .github/workflows/develop.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,68 +2,89 @@ name: Develop Workflow

on:
push:
branches:
- '**'
pull_request:
branches:
- '**'
branches-ignore:
- 'release_test'
pull_request_target:
branches-ignore:
- 'release_test'

permissions:
actions: write
checks: write
contents: write
issues: write
pull-requests: write

jobs:
build-and-test:
name: Build & Test
runs-on: ubuntu-latest
runs-on: windows-latest
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: 7.0.x
- name: Cache NuGet packages
uses: actions/cache@v3
dotnet-version: 8.0.x
- name: Setup GitVersion
uses: gittools/actions/gitversion/setup@v3.0.0
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-${{ hashFiles('**/*.csproj*') }}
versionSpec: '5.12.0'
- name: Determine Version
id: version_step
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Push New Version Tag
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
run: |
$gv = 'v${{ steps.version_step.outputs.majorMinorPatch }}' #gitversion result
$lt = $( git describe --tags --abbrev=0 ) # last tag version result
if ( -Not ( $gv -eq $lt ) )
{
git tag $gv
git push origin --tags
}
- name: Restore dependencies
run: dotnet restore
- name: Build
run: dotnet build --no-restore -c Release -v n
- name: Test
run: dotnet build /p:Version=${{ steps.version_step.outputs.fullSemVer }} --no-restore -c Release -v n
- name: Unit Tests
run: |
dotnet test -c Release --no-build -v n --filter="Category=Unit"
dotnet test -c Release ./tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests/HydraScript.Infrastructure.LexerRegexGenerator.Tests.csproj --no-build -v n
dotnet test -c Release /p:CollectCoverage=true /p:CoverletOutputFormat=cobertura --no-build -v n --filter="Category=Unit"
mkdir coverage-report
- name: Code Coverage Summary Report For Merge Request
if: github.event_name == 'pull_request'
if: github.event_name == 'pull_request_target'
uses: 5monkeys/cobertura-action@master
with:
path: ./Interpreter.Tests/coverage.cobertura.xml
path: ./tests/HydraScript.Tests/coverage.cobertura.xml
repo_token: ${{ secrets.GITHUB_TOKEN }}
minimum_coverage: 80
minimum_coverage: 20
fail_below_threshold: true
show_class_names: true
show_missing: true
link_missing_lines: true
show_branch: true
only_changed_files: true
- name: Code Coverage Summary Report For Master
if: github.ref == 'refs/heads/master' && github.event_name == 'push'
uses: irongut/[email protected]
with:
filename: ./Interpreter.Tests/coverage.cobertura.xml
badge: true
fail_below_min: false
format: markdown
hide_branch_rate: true
hide_complexity: true
thresholds: '80 100'
- name: ReportGenerator
uses: danielpalme/ReportGenerator-GitHub-Action@5.1.10
uses: danielpalme/ReportGenerator-GitHub-Action@5.2.1
with:
reports: './Interpreter.Tests/coverage.cobertura.xml'
reports: './tests/HydraScript.Tests/coverage.cobertura.xml'
targetdir: './coverage-report'
- name: Upload coverage report artifact
if: github.event_name == 'push'
uses: actions/upload-artifact@v2.2.3
uses: actions/upload-artifact@v4
with:
name: CoverageReport
path: coverage-report
- name: Integration Tests
run: dotnet test -c Release --no-build -v n --filter="Category=Integration"
- name: Upload Windows Build
if: github.ref != 'refs/heads/master' && github.event_name == 'push'
uses: actions/upload-artifact@v4
with:
name: windows_build_${{ steps.version_step.outputs.fullSemVer }}
path: ./src/HydraScript/bin/Release/net8.0
87 changes: 63 additions & 24 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,57 +2,96 @@ name: Release Workflow

on:
push:
tags:
- 'v[0-9]+.[0-9]+.[0-9]+'
branches:
- 'release_test'

jobs:
create-release:
name: Create release
runs-on: ubuntu-latest
outputs:
upload_url: ${{ steps.create_release.outputs.upload_url }}
outputs:
determined_version: ${{ steps.version_step.outputs.majorMinorPatch }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Create release
id: create_release
uses: ncipollo/release-action@v1
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup GitVersion
uses: gittools/actions/gitversion/[email protected]
with:
versionSpec: '5.12.0'
- name: Determine Version
id: version_step
uses: gittools/actions/gitversion/[email protected]
with:
useConfigFile: true
- name: Setup GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
versionSpec: '0.18.x'
- name: Create release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}

owner: 'Stepami'
repository: 'hydrascript'
milestone: 'v${{ steps.version_step.outputs.majorMinorPatch }}'
name: 'v${{ steps.version_step.outputs.majorMinorPatch }}'

upload-release-assets:
name: Upload release assets
needs: create-release
outputs:
determined_version: ${{ needs.create-release.outputs.determined_version }}
strategy:
matrix:
config:
- os: ubuntu-latest
rid: linux-x64
type: application/x-pie-executable
- os: macos-latest
rid: osx-x64
type: application/x-mach-binary
- os: macos-arm64-latest
rid: osx-arm64
- os: windows-latest
rid: win-x64
type: application/x-dosexec
runs-on: ${{ matrix.config.os }}
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Setup .NET
uses: actions/setup-dotnet@v2
uses: actions/setup-dotnet@v4
with:
dotnet-version: 8.0.x
- name: Setup GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
dotnet-version: 7.0.x
versionSpec: '0.18.x'
- name: Publish
run: |
mkdir output
dotnet publish ./Interpreter/Interpreter.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded --self-contained false -o ./output
- name: Upload release assets
uses: shogo82148/actions-upload-release-asset@v1
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
upload_url: ${{ needs.create-release.outputs.upload_url }}
asset_name: interpreter-${{ matrix.config.rid }}${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
asset_path: ./output/Interpreter${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}
asset_content_type: ${{ matrix.config.type }}
dotnet publish ./src/HydraScript/HydraScript.csproj -c Release -r ${{ matrix.config.rid }} -p:PublishSingleFile=true -p:DebugType=embedded -p:Version=${{ needs.create-release.outputs.determined_version }} --self-contained false -o ./output
- name: Add asset to a release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: 'Stepami'
repository: 'hydrascript'
milestone: 'v${{ needs.create-release.outputs.determined_version }}'
assets: ./output/HydraScript${{ matrix.config.rid == 'win-x64' && '.exe' || '' }}

publish-release:
name: Publish release
runs-on: ubuntu-latest
needs: upload-release-assets
steps:
- name: Setup GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
versionSpec: '0.18.x'
- name: Publish release with GitReleaseManager
uses: gittools/actions/gitreleasemanager/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
owner: 'Stepami'
repository: 'hydrascript'
milestone: 'v${{ needs.upload-release-assets.outputs.determined_version }}'
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,8 @@
_UpgradeReport_Files
[Pp]ackages

tests/**/coverage.cobertura.xml

Thumbs.db
Desktop.ini
.DS_Store
2 changes: 1 addition & 1 deletion CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ Contributions are welcomed! Here's a few things to know:
## Steps to Contributing

Here are the basic steps to get started with your first contribution. Please reach out with any questions.
1. Use [open issues](https://github.com/stepami/extended-js-subset/issues) to discuss the proposed changes. Create an issue describing changes if necessary to collect feedback. Also, please use provided labels to tag issues so everyone can easily sort issues of interest.
1. Use [open issues](https://github.com/stepami/hydrascript/issues) to discuss the proposed changes. Create an issue describing changes if necessary to collect feedback. Also, please use provided labels to tag issues so everyone can easily sort issues of interest.
1. [Fork the repo](https://help.github.com/articles/fork-a-repo/) in order if you want to make and test local changes.
1. Create a new branch **from master** for the issue. We suggest prefixing the branch with type of contribution (`bugfix`/`feature`), your username and then a descriptive title: (e.g. `bugfix/user1/object-comparision` or `feature/user2/variable-initialization-check`)
1. Make code changes.
Expand Down
Loading

0 comments on commit b6555ba

Please sign in to comment.