Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
258 changes: 129 additions & 129 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,143 +1,143 @@
name: Create Release

on:
release:
types: [created]
release:
types: [created]

jobs:
build:
permissions:
contents: write
strategy:
matrix:
# Include amd64 on all platforms.
goos:
# - windows
- freebsd
- openbsd
- linux
# - darwin
build:
permissions:
contents: write
strategy:
matrix:
# Include amd64 on all platforms.
goos:
# - windows
- freebsd
- openbsd
- linux
# - darwin

goarch: [ amd64, 386 ]
gotoolchain: [ "" ]
patch-assetname: [ "" ]
goarch: [amd64, 386]
gotoolchain: [""]
patch-assetname: [""]

# exclude:
# exclude:

include:
# BEGIN MacOS ARM64
# - goos: darwin
# goarch: arm64
# END MacOS ARM64
# BEGIN Linux ARM 5 6 7
- goos: linux
goarch: arm
goarm: 7
- goos: linux
goarch: arm
goarm: 6
- goos: linux
goarch: arm
goarm: 5
# END Linux ARM 5 6 7
# Windows ARM
# - goos: windows
# goarch: arm64
# - goos: windows
# goarch: arm
# goarm: 7
# BEGIN Other architectures
# BEGIN ARM64
- goos: linux
goarch: arm64
# END ARM64
#BEGIN riscv64 & LOONG64
# - goos: linux
# goarch: riscv64
# - goos: linux
# goarch: loong64
# END riscv64 & LOONG64
# BEGIN MIPS
# - goos: linux
# goarch: mips64
# - goos: linux
# goarch: mips64le
# - goos: linux
# goarch: mipsle
# - goos: linux
# goarch: mips
# END MIPS
# BEGIN PPC
# - goos: linux
# goarch: ppc64
# - goos: linux
# goarch: ppc64le
# END PPC
# BEGIN FreeBSD ARM
- goos: freebsd
goarch: arm64
- goos: freebsd
goarch: arm
goarm: 7
# END FreeBSD ARM
# BEGIN S390X
- goos: linux
goarch: s390x
# END S390X
# END Other architectures
# BEGIN OPENBSD ARM
- goos: openbsd
goarch: arm64
# - goos: openbsd
# goarch: arm
# goarm: 7
# END OPENBSD ARM
fail-fast: false
include:
# BEGIN MacOS ARM64
# - goos: darwin
# goarch: arm64
# END MacOS ARM64
# BEGIN Linux ARM 5 6 7
- goos: linux
goarch: arm
goarm: 7
- goos: linux
goarch: arm
goarm: 6
- goos: linux
goarch: arm
goarm: 5
# END Linux ARM 5 6 7
# Windows ARM
# - goos: windows
# goarch: arm64
# - goos: windows
# goarch: arm
# goarm: 7
# BEGIN Other architectures
# BEGIN ARM64
- goos: linux
goarch: arm64
# END ARM64
#BEGIN riscv64 & LOONG64
# - goos: linux
# goarch: riscv64
# - goos: linux
# goarch: loong64
# END riscv64 & LOONG64
# BEGIN MIPS
# - goos: linux
# goarch: mips64
# - goos: linux
# goarch: mips64le
# - goos: linux
# goarch: mipsle
# - goos: linux
# goarch: mips
# END MIPS
# BEGIN PPC
# - goos: linux
# goarch: ppc64
# - goos: linux
# goarch: ppc64le
# END PPC
# BEGIN FreeBSD ARM
- goos: freebsd
goarch: arm64
- goos: freebsd
goarch: arm
goarm: 7
# END FreeBSD ARM
# BEGIN S390X
- goos: linux
goarch: s390x
# END S390X
# END Other architectures
# BEGIN OPENBSD ARM
- goos: openbsd
goarch: arm64
# - goos: openbsd
# goarch: arm
# goarm: 7
# END OPENBSD ARM
fail-fast: false

runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
CGO_ENABLED: 0
steps:
- name: Checkout codebase
uses: actions/checkout@v4
runs-on: ubuntu-latest
env:
GOOS: ${{ matrix.goos }}
GOARCH: ${{ matrix.goarch }}
GOARM: ${{ matrix.goarm }}
CGO_ENABLED: 0
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Show workflow information
run: |
_GOARM="${GOARM:-""}"
if [ -n "$_GOARM" ]; then
_NAME="${GOOS}-${GOARCH}-${_GOARM}"
else
_NAME="${GOOS}-${GOARCH}"
fi
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
echo "BINARY_NAME=pasarguard-node-${_NAME}" >> $GITHUB_ENV
- name: Show workflow information
run: |
_GOARM="${GOARM:-""}"
if [ -n "$_GOARM" ]; then
_NAME="${GOOS}-${GOARCH}-${_GOARM}"
else
_NAME="${GOOS}-${GOARCH}"
fi
echo "ASSET_NAME=$_NAME" >> $GITHUB_ENV
echo "BINARY_NAME=pasarguard-node-${_NAME}" >> $GITHUB_ENV

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: '1.25.7'
check-latest: true
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.1"
check-latest: true

- name: Get project dependencies
run: make deps
- name: Get project dependencies
run: make deps

- name: Build binary and zip
run: |
make
find . -type f -name "pasarguard-node*" -exec mv {} "./pasarguard-node-${{ env.ASSET_NAME }}" \;
# Create zip file with max compression and include README & LICENSE
zip -9 "./pasarguard-node-${{ env.ASSET_NAME }}.zip" "./pasarguard-node-${{ env.ASSET_NAME }}" README.md LICENSE
- name: Build binary and zip
run: |
make
find . -type f -name "pasarguard-node*" -exec mv {} "./pasarguard-node-${{ env.ASSET_NAME }}" \;
# Create zip file with max compression and include README & LICENSE
zip -9 "./pasarguard-node-${{ env.ASSET_NAME }}.zip" "./pasarguard-node-${{ env.ASSET_NAME }}" README.md LICENSE

- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./pasarguard-node-${{ env.ASSET_NAME }}.zip
asset_name: pasarguard-node-${{ env.ASSET_NAME }}.zip
asset_content_type: application/zip
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ./pasarguard-node-${{ env.ASSET_NAME }}.zip
asset_name: pasarguard-node-${{ env.ASSET_NAME }}.zip
asset_content_type: application/zip
68 changes: 34 additions & 34 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -1,47 +1,47 @@
name: Test Modules

on:
pull_request:
branches:
- "**"
push:
branches:
- "dev"
- "wg"
pull_request:
branches:
- "**"
push:
branches:
- "dev"
- "wg"

jobs:
test:
runs-on: ubuntu-latest
env:
GOTOOLCHAIN: auto
test:
runs-on: ubuntu-latest
env:
GOTOOLCHAIN: auto

steps:
- name: Checkout codebase
uses: actions/checkout@v4
steps:
- name: Checkout codebase
uses: actions/checkout@v4

- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.25.7"
check-latest: true
- name: Set up Go
uses: actions/setup-go@v6
with:
go-version: "1.26.1"
check-latest: true

- name: Get project dependencies
run: make deps
- name: Get project dependencies
run: make deps

- name: Install xray-core
run: make install_xray
- name: Install xray-core
run: make install_xray

- name: install wg
run: make install_wg
- name: install wg
run: make install_wg

- name: Create certificate
run: |
mkdir -p certs
make generate_server_cert
make generate_client_cert
- name: Create certificate
run: |
mkdir -p certs
make generate_server_cert
make generate_client_cert

- name: Run regular test suite
run: TEST_INTEGRATION=true go test ./... -v -p 1
- name: Run regular test suite
run: TEST_INTEGRATION=true go test ./... -v -p 1

- name: Run wireguard integration tests
run: sudo -E make test-integration-wireguard
- name: Run wireguard integration tests
run: sudo -E make test-integration-wireguard
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.25.7-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.1-alpine AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.wireguard
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.25.7-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.1-alpine AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile.xray
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM --platform=$BUILDPLATFORM golang:1.25.7-alpine AS builder
FROM --platform=$BUILDPLATFORM golang:1.26.1-alpine AS builder

ARG TARGETOS
ARG TARGETARCH
Expand Down
Loading
Loading