Browse Source

Clean dotnet install logic (#499)

* Clean dotnet install logic

* Update .appveyor.yml
pull/526/head
Ayoub Kaanich 10 months ago
committed by GitHub
parent
commit
15c95ecb2d
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 2
      .circleci/config.yml
  2. 6
      .github/workflows/dotnet-core.yml
  3. 47
      .semaphore/semaphore.yml
  4. 3
      azure-pipelines.yml
  5. 10
      scripts/install-dotnet.sh
  6. 1
      scripts/install-windows.ps1

2
.circleci/config.yml

@ -34,7 +34,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:
@ -58,7 +57,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

6
.github/workflows/dotnet-core.yml

@ -16,12 +16,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

47
.semaphore/semaphore.yml

@ -1,47 +0,0 @@
# Copyright 2021-2022 Ayoub Kaanich <kayoub5@live.com>
# SPDX-License-Identifier: MIT
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

3
azure-pipelines.yml

@ -31,7 +31,6 @@ jobs:
pool:
vmImage: macOS-12
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
@ -48,7 +47,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:
@ -63,7 +61,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:

10
scripts/install-dotnet.sh

@ -1,10 +0,0 @@
#!/usr/bin/env bash
# Copyright 2022 Ayoub Kaanich <kayoub5@live.com>
# SPDX-License-Identifier: MIT
set -e
curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin -c 6.0 "$@"
dotnet --list-sdks

1
scripts/install-windows.ps1

@ -2,6 +2,5 @@
# Copyright 2022 Ayoub Kaanich <kayoub5@live.com>
# SPDX-License-Identifier: MIT
choco install -y dotnet-sdk --version=6.0.300
choco install -y tapwindows
choco install -y procdump
Loading…
Cancel
Save