From ce285ad5705bef734dfc528a9386b6663337374b Mon Sep 17 00:00:00 2001 From: Ayoub Kaanich Date: Wed, 3 Jan 2024 22:35:57 +0100 Subject: [PATCH 1/2] Clean dotnet install logic --- .appveyor.yml | 2 +- .circleci/config.yml | 2 -- .github/workflows/dotnet-core.yml | 6 ----- .semaphore/semaphore.yml | 44 ------------------------------- azure-pipelines.yml | 3 --- scripts/install-dotnet.sh | 7 ----- scripts/install-windows.ps1 | 1 - 7 files changed, 1 insertion(+), 64 deletions(-) delete mode 100644 .semaphore/semaphore.yml delete mode 100644 scripts/install-dotnet.sh diff --git a/.appveyor.yml b/.appveyor.yml index b08333c8..4f124727 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -33,7 +33,7 @@ for: only: - image: macos install: - - brew install --cask dotnet-sdk + - brew install --cask dotnet-sdk@8 - sudo -E bash scripts/install-libpcap.sh test_script: - sudo -E bash scripts/test.sh diff --git a/.circleci/config.yml b/.circleci/config.yml index 5504ab3c..f1233879 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -31,7 +31,6 @@ jobs: image: ubuntu-2004:202201-02 steps: - checkout - - run: sudo -E bash scripts/install-dotnet.sh --install-dir /usr/local/bin - run: sudo -E bash scripts/install-tap.sh # Download and compile latest libpcap - when: @@ -55,7 +54,6 @@ jobs: resource_class: arm.medium steps: - checkout - - run: sudo -E bash scripts/install-dotnet.sh --install-dir /usr/local/bin - run: sudo -E bash scripts/install-tap.sh - run: sudo apt-get install libpcap0.8 - run: sudo -E bash scripts/test.sh diff --git a/.github/workflows/dotnet-core.yml b/.github/workflows/dotnet-core.yml index 5ecf432d..ad7beccc 100644 --- a/.github/workflows/dotnet-core.yml +++ b/.github/workflows/dotnet-core.yml @@ -13,12 +13,6 @@ jobs: steps: - uses: actions/checkout@v4 - - name: Setup .NET Core - uses: actions/setup-dotnet@v4 - with: - dotnet-version: 6.0.x - - name: Install .net dependencies - run: dotnet restore - name: Install libpcap run: sudo -E bash scripts/install-libpcap.sh - name: Install tap diff --git a/.semaphore/semaphore.yml b/.semaphore/semaphore.yml deleted file mode 100644 index d0c6ace6..00000000 --- a/.semaphore/semaphore.yml +++ /dev/null @@ -1,44 +0,0 @@ -version: v1.0 -name: Pipeline -agent: - machine: - type: e1-standard-2 - os_image: ubuntu2004 -auto_cancel: - running: - when: 'true' - -global_job_config: - secrets: - - name: sharppcap_codecov - -blocks: - - name: ubuntu-2004 - dependencies: [] - task: - jobs: - - commands: - - checkout - - sudo -E bash scripts/install-libpcap.sh - - sudo -E bash scripts/install-tap.sh - - sudo -E bash scripts/install-dotnet.sh --install-dir /usr/local/bin - - sudo -E bash scripts/test.sh --filter "TestCategory!=Performance" - name: Test - agent: - machine: - type: e1-standard-2 - os_image: ubuntu2004 - - name: macos-xcode12 - dependencies: [] - task: - agent: - machine: - type: a1-standard-4 - os_image: macos-xcode12 - jobs: - - commands: - - checkout - - sudo -E bash scripts/install-libpcap.sh - - sudo -E bash scripts/install-dotnet.sh --install-dir /usr/local/bin - - sudo -E bash scripts/test.sh --filter "TestCategory!=Performance" - name: Test diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3e7e7836..651e6670 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,7 +27,6 @@ jobs: pool: vmImage: macOS-11 steps: - - script: sudo -E bash scripts/install-dotnet.sh - script: sudo -E bash scripts/install-libpcap.sh - script: sudo sysctl -w net.inet.udp.maxdgram=65535 - script: sudo -E bash scripts/test.sh @@ -44,7 +43,6 @@ jobs: env: npcap_oem_key: $(npcap_oem_key) - pwsh: .\scripts\install-winpkfilter.ps1 - - script: dotnet restore -s https://api.nuget.org/v3/index.json # NOTE: Remove filter when npcap has rpcapd support - script: bash scripts/test.sh --filter "TestCategory!=RemotePcap" -r win-x86 env: @@ -59,7 +57,6 @@ jobs: env: npcap_oem_key: $(npcap_oem_key) - pwsh: .\scripts\install-winpkfilter.ps1 - - script: dotnet restore -s https://api.nuget.org/v3/index.json # NOTE: Remove filter when npcap has rpcapd support - script: bash scripts/test.sh --filter "TestCategory!=RemotePcap" env: diff --git a/scripts/install-dotnet.sh b/scripts/install-dotnet.sh deleted file mode 100644 index 75ae70bb..00000000 --- a/scripts/install-dotnet.sh +++ /dev/null @@ -1,7 +0,0 @@ -#!/usr/bin/env bash - -set -e - -curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 "$@" - -dotnet --list-sdks diff --git a/scripts/install-windows.ps1 b/scripts/install-windows.ps1 index 24edb86b..462aadae 100644 --- a/scripts/install-windows.ps1 +++ b/scripts/install-windows.ps1 @@ -1,4 +1,3 @@ -choco install -y dotnet-sdk --version=6.0.300 choco install -y tapwindows choco install -y procdump From e117221613893e20b493a1658eed0017e0e91c98 Mon Sep 17 00:00:00 2001 From: Ayoub Kaanich Date: Fri, 5 Jan 2024 01:28:21 +0100 Subject: [PATCH 2/2] Update .appveyor.yml --- .appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.appveyor.yml b/.appveyor.yml index 4f124727..b08333c8 100644 --- a/.appveyor.yml +++ b/.appveyor.yml @@ -33,7 +33,7 @@ for: only: - image: macos install: - - brew install --cask dotnet-sdk@8 + - brew install --cask dotnet-sdk - sudo -E bash scripts/install-libpcap.sh test_script: - sudo -E bash scripts/test.sh