Closed aquawius closed 1 year ago
I also tried ~/go/bin/caddy build
(without --with
option)
It also like that
2022/12/30 07:23:42 [INFO] exec (timeout=0s): /usr/bin/go build -o /root/go/bin/caddy -ldflags -w -s -trimpath
go build github.com/yuin/goldmark/util: /usr/lib/go-1.19/pkg/tool/linux_amd64/compile: signal: killed
2022/12/30 07:23:51 [INFO] Cleaning up temporary folder: /tmp/buildenv_2022-12-30-0723.570449764
2022/12/30 07:23:51 [FATAL] exit status 1
Sorry, I reboot my machine, the problem solved. That's my fault.
I suggest that you use GitHub Actions for building artifacts. The runner image already has lots of tools set up so that you don't need to install anything on your own computer.
name: xcaddy build
on:
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: 'stable'
- name: Install prebuilt xcaddy from Cloudsmith
run: |
sudo apt update
sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo gpg --dearmor -o /usr/share/keyrings/caddy-xcaddy-archive-keyring.gpg
curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
sudo apt update
sudo apt install xcaddy
- name: Run xcaddy build with
run: |
xcaddy build \
--with github.com/caddyserver/forwardproxy@caddy2=github.com/klzgrad/forwardproxy@naive
- name: Tar artifact
run: |
tar -czvf caddy-linux-amd64.tar.gz ./caddy
- name: Print SHA256 sum
run: |
sha256sum ./caddy
sha256sum ./caddy-linux-amd64.tar.gz
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: caddy-linux-amd64.tar.gz
path: ./caddy-linux-amd64.tar.gz
if-no-files-found: error
I think there is a compilation problem with the dependent component, but I don't know where to report back. I have tried this many times, but it always returns the same error.
Here the complie log: