adding row reordering to .Net Regex converter broke the Enabled check… #189
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
# Build encoding converters and run tests | |
name: Build | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
workflow_dispatch: | |
env: | |
# Path to the solution file relative to the root of the project. | |
SOLUTION_FILE_PATH: "./EncConverters 2019.sln" | |
jobs: | |
build-windows: | |
runs-on: windows-2019 # [windows-latest] # VS 2022 doesn't automatically include the proper .net framework | |
strategy: | |
# Keep building other jobs even if another fails, to show what _is_ still working. | |
fail-fast: false | |
matrix: | |
build_configuration: ["Debug", "Release"] | |
build_platform: ["Win32", "x64"] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Add MSBuild to PATH | |
uses: microsoft/setup-msbuild@v2 | |
- name: Fetch nuget dependecies | |
run: nuget restore "${{env.SOLUTION_FILE_PATH}}" | |
- name: Build | |
working-directory: ${{env.GITHUB_WORKSPACE}} | |
# Add additional options to the MSBuild command line here (like platform or verbosity level). | |
# See https://docs.microsoft.com/visualstudio/msbuild/msbuild-command-line-reference | |
run: msbuild /m /p:Configuration=${{matrix.build_configuration}} /p:Platform=${{ matrix.build_platform }} "${{env.SOLUTION_FILE_PATH}}" | |
- name: List Files in Repository | |
run: dir /s | |
shell: cmd | |
- uses: actions/[email protected] | |
with: | |
name: build-artifacts-${{ matrix.build_platform }}-${{ matrix.build_configuration }} | |
path: | | |
output\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\*.exe | |
output\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\*.dll | |
output\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\*.tlb | |
output\${{ matrix.build_platform }}\${{ matrix.build_configuration }}\*.config | |
output\MergeModules\**\*.* | |
retention-days: 1 | |
publish_nuget: | |
needs: build-windows | |
runs-on: windows-2019 | |
strategy: | |
# Keep building other jobs even if another fails, to show what _is_ still working. | |
fail-fast: false | |
matrix: | |
build_configuration: ["Release"] | |
steps: | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: Download all workflow run artifacts | |
uses: actions/[email protected] | |
- name: Get Folder Names | |
id: get-folders | |
run: | | |
$folderNames = Get-ChildItem -Directory -Path . | Where-Object { $_.Name -like 'build-artifacts-*' } | Select-Object -ExpandProperty Name | |
$folderNames | |
foreach ($folderName in $folderNames) { | |
$source = "$folderName\*.*" | |
"xcopy /s /y $source .\" | |
xcopy /s /y $source .\ | |
} | |
- name: List Files in Repository | |
run: dir /s | |
shell: cmd | |
- name: Create NuGet Package | |
run: nuget pack ./Package.${{matrix.build_configuration}}.nuspec -OutputDirectory ./output/${{matrix.build_configuration}} | |
- name: Upload NuGet Package as Artifact | |
uses: actions/[email protected] | |
with: | |
name: ${{matrix.build_configuration}}-nuget-package | |
path: ./output/${{matrix.build_configuration}}/*.nupkg | |
# TODO Run tests | |
#- name: Test | |
# run: output/Win32/${{matrix.build_configuration}}/RunTests.exe | |
build-linux: | |
runs-on: [ubuntu-20.04] | |
strategy: | |
matrix: | |
build_configuration: ["Debug", "Release"] | |
steps: | |
- name: Add repo packages.sil.org | |
run: | | |
(wget -O- https://packages.sil.org/keys/pso-keyring-2016.gpg | sudo tee /etc/apt/trusted.gpg.d/pso-keyring-2016.gpg)&>/dev/null | |
(. /etc/os-release && sudo tee /etc/apt/sources.list.d/packages-sil-org.list>/dev/null <<< "deb http://packages.sil.org/$ID $VERSION_CODENAME main") | |
sudo apt-get update | |
- name: Install dependencies | |
run: sudo apt-get install --assume-yes automake g++ python2-dev python2 libicu-dev mono5-sil icu-dev-fw libteckit-dev | |
- name: Checkout | |
uses: actions/[email protected] | |
- name: List Files in Repository | |
run: ls -R | |
- name: Restore NuGet Packages | |
run: nuget restore "${{env.SOLUTION_FILE_PATH}}" | |
- name: Autogen | |
run: . environ && ./autogen.sh | |
- name: Build | |
run: . environ && make | |
- name: Test | |
if: matrix.build_configuration == 'Debug' | |
run: | | |
. environ | |
export EC_COMMON_APPLICATION_DATA_PATH="$(pwd)/ec-common" | |
export MONO_REGISTRY_PATH="${EC_COMMON_APPLICATION_DATA_PATH}/registry" | |
cp -a src/RunTests/bin/x64/${{matrix.build_configuration}}/RunTests.exe output/x64/${{matrix.build_configuration}}/ | |
# Note that currently, many tests fail and it doesn't fail this build step. | |
mono output/x64/${{matrix.build_configuration}}/RunTests.exe |