From 8f207e7a0693d8f3cfe65e951b9e5ff3897475a6 Mon Sep 17 00:00:00 2001 From: Cornelius Riemenschneider Date: Wed, 1 May 2024 22:02:58 +0200 Subject: [PATCH] Add `dotnet tool restore` to local CI. --- .github/workflows/codeql-analysis.yml | 4 +++- .github/workflows/csharp-qltest.yml | 3 ++- csharp/scripts/create-extractor-pack.sh | 1 + 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index d34d40dd8fa..fbe5338e4ca 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -56,7 +56,9 @@ jobs: # uses a compiled language - run: | - dotnet build csharp + cd csharp + dotnet tool restore + dotnet build . - name: Perform CodeQL Analysis uses: github/codeql-action/analyze@main diff --git a/.github/workflows/csharp-qltest.yml b/.github/workflows/csharp-qltest.yml index 81398a4dd2c..2075e10a77a 100644 --- a/.github/workflows/csharp-qltest.yml +++ b/.github/workflows/csharp-qltest.yml @@ -81,10 +81,11 @@ jobs: dotnet-version: 8.0.101 - name: Extractor unit tests run: | + dotnet tool restore dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Util.Tests dotnet test -p:RuntimeFrameworkVersion=8.0.1 extractor/Semmle.Extraction.Tests dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.CSharp.Tests - dotnet test -p:RuntimeFrameworkVersion=8.0.1 "${{ github.workspace }}/csharp/autobuilder/Semmle.Autobuild.Cpp.Tests" + dotnet test -p:RuntimeFrameworkVersion=8.0.1 autobuilder/Semmle.Autobuild.Cpp.Tests shell: bash stubgentest: runs-on: ubuntu-latest diff --git a/csharp/scripts/create-extractor-pack.sh b/csharp/scripts/create-extractor-pack.sh index 4b39d7c7dd5..7eb2b753471 100755 --- a/csharp/scripts/create-extractor-pack.sh +++ b/csharp/scripts/create-extractor-pack.sh @@ -24,6 +24,7 @@ function dotnet_publish { dotnet publish --self-contained --configuration Release --runtime ${dotnet_platform} -p:RuntimeFrameworkVersion=8.0.1 $1 --output extractor-pack/tools/${platform} } +dotnet tool restore dotnet_publish extractor/Semmle.Extraction.CSharp.Standalone dotnet_publish extractor/Semmle.Extraction.CSharp.Driver dotnet_publish autobuilder/Semmle.Autobuild.CSharp