From 554ee57be21444c28658fb9adbcd6b91a635743c Mon Sep 17 00:00:00 2001 From: seebees Date: Wed, 11 Oct 2023 12:15:55 -0700 Subject: [PATCH] chore: Update CI for .Net Framework (#89) The .Net framework is only supported in windows. Also, update the SharedMakefile to consolidate passing the framework. --- .github/workflows/library_net_tests.yml | 19 ++++++------------- SharedMakefileV2.mk | 9 ++++++--- 2 files changed, 12 insertions(+), 16 deletions(-) diff --git a/.github/workflows/library_net_tests.yml b/.github/workflows/library_net_tests.yml index 5286c77ab..dbb9df5d7 100644 --- a/.github/workflows/library_net_tests.yml +++ b/.github/workflows/library_net_tests.yml @@ -73,29 +73,22 @@ jobs: CORES=$(node -e 'console.log(os.cpus().length)') make transpile_net CORES=$CORES + # .NET Framework is only supported in Windows - name: Test ${{ matrix.library }} .NET Framework net48 + if: matrix.os == 'windows-latest' working-directory: ./${{ matrix.library }} shell: bash run: | - if [ "$RUNNER_OS" == "macOS" ]; then - DYLD_LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib" - dotnet run \ - --project runtimes/net/tests/ \ - --framework net48 - else - dotnet run \ - --project runtimes/net/tests/ \ - --framework net48 - fi + make test_net FRAMEWORK=net48 - - name: Test ${{ matrix.library }} + - name: Test ${{ matrix.library }} .NET net6.0 working-directory: ./${{ matrix.library }} shell: bash run: | if [ "$RUNNER_OS" == "macOS" ]; then - make test_net_mac_intel + make test_net_mac_intel FRAMEWORK=net6.0 else - make test_net + make test_net FRAMEWORK=net6.0 fi - name: Test Cache Thread Safety diff --git a/SharedMakefileV2.mk b/SharedMakefileV2.mk index 4de04a5e9..abca44ae9 100644 --- a/SharedMakefileV2.mk +++ b/SharedMakefileV2.mk @@ -307,20 +307,23 @@ transpile_test_net: _transpile_test_all transpile_dependencies_net: LANG=net transpile_dependencies_net: transpile_dependencies +test_net_mac_brew: FRAMEWORK=net6.0 test_net: dotnet run \ --project runtimes/net/tests/ \ - --framework net6.0 + --framework $(FRAMEWORK) +test_net_mac_brew: FRAMEWORK=net6.0 test_net_mac_intel: DYLD_LIBRARY_PATH="/usr/local/opt/openssl@1.1/lib" dotnet run \ --project runtimes/net/tests/ \ - --framework net6.0 + --framework $(FRAMEWORK) +test_net_mac_brew: FRAMEWORK=net6.0 test_net_mac_brew: DYLD_LIBRARY_PATH="$(shell brew --prefix)/opt/openssl@1.1/lib/" dotnet run \ --project runtimes/net/tests/ \ - --framework net6.0 + --framework $(FRAMEWORK) setup_net: dotnet restore runtimes/net/