Merge pull request #185 from ByteTheCookies/fix/v1.3.1 #173
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # This workflow will build and test the Go server and client | |
| # based on the project Justfile targets. | |
| name: Go Build & Test | |
| on: | |
| push: | |
| branches: ["main", "dev"] | |
| paths: | |
| - "cookiefarm/**" | |
| - ".github/workflows/go.yml" | |
| pull_request: | |
| branches: ["main", "dev"] | |
| paths: | |
| - "cookiefarm/**" | |
| - ".github/workflows/go.yml" | |
| jobs: | |
| build-server: | |
| name: Build Server | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: cookiefarm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Build server | |
| run: go build -o ./bin/server ./server/main.go | |
| - name: Build server plugins | |
| run: | | |
| for file in $(find ./pkg/protocols -name '*.go' ! -name 'protocols.go'); do | |
| if grep -q '^package main' "$file"; then | |
| filename=$(basename "$file") | |
| pluginname=${filename%.go} | |
| go build -buildmode=plugin -o "./pkg/protocols/$pluginname.so" "$file" | |
| else | |
| echo "Skipping $file: not a main package" | |
| fi | |
| done | |
| build-client: | |
| name: Build Client | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: cookiefarm | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v4 | |
| with: | |
| go-version: '1.26.1' | |
| - name: Build client | |
| run: go build -o ./bin/client ./client/main.go |