diff --git a/.github/workflows/golang-test-windows.yml b/.github/workflows/golang-test-windows.yml index 4b168e36b..24ddd7d4a 100644 --- a/.github/workflows/golang-test-windows.yml +++ b/.github/workflows/golang-test-windows.yml @@ -6,20 +6,12 @@ on: - main pull_request: -jobs: - pre: - runs-on: ubuntu-latest - steps: - - name: Checkout code - uses: actions/checkout@v2 +env: + downloadPath: '${{ github.workspace }}\temp' - - uses: actions/upload-artifact@v2 - with: - name: dll - path: client/*.dll +jobs: test: - needs: pre runs-on: windows-latest steps: - name: Checkout code @@ -40,10 +32,30 @@ jobs: restore-keys: | ${{ runner.os }}-go- - - uses: actions/download-artifact@v2 + - name: Download wintun + uses: carlosperate/download-file-action@v2 + id: download-wintun with: - name: dll - path: C:\Windows\System32\ + file-url: https://www.wintun.net/builds/wintun-0.14.1.zip + file-name: wintun.zip + location: ${{ env.downloadPath }} + sha256: '07c256185d6ee3652e09fa55c0b673e2624b565e02c4b9091c79ca7d2f24ef51' + + - name: Decompressing wintun files + run: tar -zvxf "${{ steps.download-wintun.outputs.file-path }}" -C ${{ env.downloadPath }} + + - run: mv ${{ env.downloadPath }}/wintun/bin/amd64/wintun.dll 'C:\Windows\System32\' + + - name: Download PSTools + uses: carlosperate/download-file-action@v2 + id: download-pstools + with: + file-url: https://download.sysinternals.com/files/PSTools.zip + file-name: PSTools.zip + location: ${{ env.downloadPath }} + + - name: Decompressing PSTools files + run: tar -zvxf "${{ steps.download-pstools.outputs.file-path }}" -C ${{ env.downloadPath }} - name: Test - run: go test -timeout 5m -p 1 ./... \ No newline at end of file + run: ${{ env.downloadPath }}\PsExec64.exe -s go test -timeout 5m -p 1 ./... \ No newline at end of file diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 699b867eb..59c0bc912 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,10 +21,6 @@ jobs: uses: actions/checkout@v2 with: fetch-depth: 0 # It is required for GoReleaser to work properly - - - name: Generate syso with DLL - run: bash -x wireguard_nt.sh - working-directory: client - name: Set up Go uses: actions/setup-go@v2 @@ -59,6 +55,17 @@ jobs: password: ${{ secrets.DOCKER_TOKEN }} - name: Install OS build dependencies run: sudo apt update && sudo apt install -y -q gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu + + - name: Install rsrc + run: go install github.com/akavel/rsrc@v0.10.2 + - name: Generate windows rsrc amd64 + run: rsrc -arch amd64 -ico client/ui/netbird.ico -manifest client/manifest.xml -o client/resources_windows_amd64.syso + - name: Generate windows rsrc arm64 + run: rsrc -arch arm64 -ico client/ui/netbird.ico -manifest client/manifest.xml -o client/resources_windows_arm64.syso + - name: Generate windows rsrc arm + run: rsrc -arch arm -ico client/ui/netbird.ico -manifest client/manifest.xml -o client/resources_windows_arm.syso + - name: Generate windows rsrc 386 + run: rsrc -arch 386 -ico client/ui/netbird.ico -manifest client/manifest.xml -o client/resources_windows_386.syso - name: Run GoReleaser uses: goreleaser/goreleaser-action@v2 diff --git a/client/wintun.dll b/client/wintun.dll deleted file mode 100644 index aee04e77b..000000000 Binary files a/client/wintun.dll and /dev/null differ