diff --git a/.github/workflows/deploy.yml b/.github/workflows/build-and-deploy.yml similarity index 100% rename from .github/workflows/deploy.yml rename to .github/workflows/build-and-deploy.yml diff --git a/.github/workflows/docker-build.yml b/.github/workflows/build-and-push-docker.yml similarity index 100% rename from .github/workflows/docker-build.yml rename to .github/workflows/build-and-push-docker.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test-on-linux.yml similarity index 53% rename from .github/workflows/test.yml rename to .github/workflows/test-on-linux.yml index 8ef0ded4..a926706e 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test-on-linux.yml @@ -1,20 +1,21 @@ -name: Test +name: Test on Linux on: push: branches: [ "master" ] pull_request: branches: [ "master" ] + workflow_dispatch: jobs: - test: - runs-on: ${{ matrix.os }} - strategy: - matrix: - os: [ubuntu-latest, macos-latest] - go-version: ['1.22.x'] - - steps: + build: + runs-on: ubuntu-latest + strategy: + matrix: + os: [ubuntu-latest] + go-version: ['1.22.x'] + + steps: - name: Checkout Code uses: actions/checkout@v2 @@ -24,13 +25,9 @@ jobs: go-version: ${{ matrix.go-version }} - name: Install Dependencies - if: ${{ matrix.os == 'ubuntu-latest' }} run: sudo apt-get update && sudo apt-get install -y p7zip-full libpcap-dev libnetfilter-queue-dev libusb-1.0-0-dev - - name: Install Dependencies (macOS) - if: ${{ matrix.os == 'macos-latest' }} - run: brew install libpcap libusb p7zip - - name: Run Tests run: | - env GO111MODULE=on make test \ No newline at end of file + env GO111MODULE=on make test + \ No newline at end of file diff --git a/.github/workflows/test-on-macos.yml b/.github/workflows/test-on-macos.yml new file mode 100644 index 00000000..3a9f49b0 --- /dev/null +++ b/.github/workflows/test-on-macos.yml @@ -0,0 +1,33 @@ +name: Test on macOS + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +jobs: + build: + runs-on: macos-latest + strategy: + matrix: + os: [macos-latest] + go-version: ['1.22.x'] + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Install Dependencies + run: brew install libpcap libusb p7zip + + - name: Run Tests + run: | + env GO111MODULE=on make test + \ No newline at end of file diff --git a/.github/workflows/test-on-windows.yml b/.github/workflows/test-on-windows.yml new file mode 100644 index 00000000..2ad759ab --- /dev/null +++ b/.github/workflows/test-on-windows.yml @@ -0,0 +1,44 @@ +name: Test on Windows + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + workflow_dispatch: + +jobs: + build: + runs-on: windows-latest + strategy: + matrix: + os: [windows-latest] + go-version: ['1.22.x'] + + steps: + - name: Checkout Code + uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + + - name: Install Dependencies + run: | + choco install openssl.light -y + choco install make -y + choco install 7zip -y + choco install pkgconfiglite -y + mkdir C:\pkg-config + choco install zadig -y + curl -L "https://github.com/libusb/libusb/releases/download/v1.0.24/libusb-1.0.24.7z" -o "C:\libusb.7z" + 7z x -y "C:\libusb.7z" -o"C:\libusb" + curl -L "https://www.winpcap.org/install/bin/WpdPack_4_1_2.zip" -o "C:\wpcap-sdk.zip" + 7z x -y "C:\wpcap-sdk.zip" -o"C:\winpcap" + copy builder\libusb.pc C:\pkg-config\libusb.pc + copy builder\libusb.pc C:\pkg-config\libusb-1.0.pc + + - name: Run Tests + run: env GO111MODULE=on make test + \ No newline at end of file