-
Notifications
You must be signed in to change notification settings - Fork 6
Build package once and test across all platforms #56
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
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,8 +79,67 @@ on: | |
| default: "tree" | ||
|
|
||
| jobs: | ||
| build: | ||
| build-package: | ||
| if: inputs.build_package == true | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Актуализация | ||
| uses: actions/checkout@v6.0.2 | ||
|
|
||
| - name: Установка свойств git | ||
| shell: bash | ||
| run: | | ||
| git config --global user.name "GitHub Actions" | ||
| git config --global user.email "41898282+github-actions[bot]@users.noreply.github.com" | ||
|
|
||
| - name: Установка .NET | ||
| if: inputs.dotnet_version != '' | ||
| uses: actions/setup-dotnet@v5 | ||
| with: | ||
| dotnet-version: ${{ inputs.dotnet_version }} | ||
|
|
||
| - name: Вычисление версии OneScript | ||
| shell: bash | ||
| id: extract_oscript_version | ||
| run: | | ||
| set -ex | ||
| if [ "${{ inputs.oscript_version }}" = "default" ] | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Всегда извлекать версию OneScript из манифеста |
||
| then | ||
| extracted_version=$(cat packagedef | grep ".ВерсияСреды(" | sed 's|[^"]*"||' | sed -r 's/".+//' || true) | ||
| version="${extracted_version:-stable}" | ||
| else | ||
| version="${{ inputs.oscript_version }}" | ||
| fi | ||
| echo "version=$version" >> $GITHUB_OUTPUT | ||
|
|
||
| - name: Установка OneScript | ||
| uses: otymko/setup-onescript@v1.5.1 | ||
| with: | ||
| version: ${{ steps.extract_oscript_version.outputs.version }} | ||
|
|
||
| - name: Установка зависимостей | ||
| shell: bash | ||
| run: | | ||
| if [ -n "${{ inputs.opm_version }}" ]; then | ||
| opm install opm@${{ inputs.opm_version }} | ||
| else | ||
| opm install opm | ||
| fi | ||
| opm install -l | ||
|
|
||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Пропущена "Установка дополнительных пакетов" |
||
| - name: Сборка пакета | ||
| run: opm build . | ||
|
|
||
| - name: Заливка артефакта пакета | ||
| uses: actions/upload-artifact@v6 | ||
| with: | ||
| name: package | ||
| path: ./*.ospx | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Возможно можно задать универсальный паттерн например
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Хотя указанный в inputs out-каталог действительно будет предпочтительней. Который будет передаваться в |
||
|
|
||
| test: | ||
| runs-on: ${{ matrix.os }} | ||
| needs: build-package | ||
| if: ${{ !cancelled() && (needs.build-package.result == 'success' || needs.build-package.result == 'skipped') }} | ||
| env: | ||
| LANG: ${{ inputs.locale }}.UTF-8 | ||
| LC_ALL: ${{ inputs.locale }}.UTF-8 | ||
|
|
@@ -96,7 +155,7 @@ jobs: | |
| steps: | ||
| - name: Актуализация | ||
| uses: actions/checkout@v6.0.2 | ||
|
|
||
| - name: Установка локали (Windows) | ||
| if: startsWith(matrix.os, 'windows') | ||
| run: | | ||
|
|
@@ -180,9 +239,12 @@ jobs: | |
| if: inputs.additional_oscript_packages != '' | ||
| run: opm install -l ${{ inputs.additional_oscript_packages }} | ||
|
|
||
| - name: Сборка пакета | ||
| - name: Скачивание собранного пакета | ||
| if: inputs.build_package == true | ||
| run: opm build . | ||
| uses: actions/download-artifact@v7 | ||
| with: | ||
| name: package | ||
| path: . | ||
|
|
||
| - name: Тестирование | ||
| if: matrix.test_engine == '1testrunner' | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для сонара я думаю это излишне)