LT-21212 Prevent duplicate custom fields #205
Workflow file for this run
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
name: LibLCM CI and CD | |
on: | |
pull_request: | |
branches: [ develop, master ] | |
push: | |
branches: [ develop, master ] | |
# Trigger on release tags | |
tags: [ 'v[0-9]+*' ] | |
jobs: | |
build: | |
strategy: | |
fail-fast: false | |
matrix: | |
os: [windows-latest, ubuntu-latest] | |
runs-on: ${{ matrix.os }} | |
env: | |
DOTNET_NOLOGO: true | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
# Install the .NET Core workload | |
- name: Install .NET Core | |
uses: actions/setup-dotnet@v2 | |
with: | |
dotnet-version: 6.0.x | |
- name: Install mono-devel package | |
run: sudo apt-get install mono-devel | |
if: matrix.os == 'ubuntu-latest' | |
- name: Install icu-fw package | |
run: wget -qO - http://linux.lsdev.sil.org/downloads/sil-testing.gpg | sudo tee /etc/apt/trusted.gpg.d/linux-lsdev-sil-org.asc && | |
sudo add-apt-repository "deb http://linux.lsdev.sil.org/ubuntu $(lsb_release -sc)-experimental main" && | |
sudo apt-get install icu-fw | |
if: matrix.os == 'ubuntu-latest' | |
# Solve problems with CustomIcuFallbackTests: the current windows-latest image (2022) includes this file that breaks our tests. | |
- name: Solve problems | |
run: Remove-Item c:\tools\php\icuuc*.dll -Force | |
if: matrix.os == 'windows-latest' | |
- name: Build | |
run: dotnet build --configuration Release | |
- name: Test on Linux | |
run: | | |
. environ | |
dotnet test --no-restore --no-build -p:ParallelizeAssembly=false --configuration Release -- RunConfiguration.FailWhenNoTestsFound=true | |
if: matrix.os == 'ubuntu-latest' | |
- name: Test on Windows | |
run: dotnet test -a "%UserProfile%\.nuget\packages\nunit3testadapter\4.5.0\build\net462" --no-restore --no-build -p:ParallelizeAssembly=false --configuration Release -- RunConfiguration.FailWhenNoTestsFound=true | |
if: matrix.os != 'ubuntu-latest' | |
- name: Package | |
run: dotnet pack --include-symbols --no-restore --no-build -p:SymbolPackageFormat=snupkg --configuration Release | |
- name: Publish to Nuget | |
run: dotnet nuget push artifacts/*.nupkg -s https://api.nuget.org/v3/index.json -k ${{secrets.SILLSDEV_PUBLISH_NUGET_ORG}} --skip-duplicate | |
if: github.event_name == 'push' && matrix.os == 'ubuntu-latest' | |
- name: Publish Artifacts | |
uses: actions/upload-artifact@v3 | |
with: | |
name: NugetPackages | |
path: artifacts/*.nupkg | |
if: github.event_name == 'pull_request' |