Skip to content

Cleanup

Cleanup #376

Workflow file for this run

name: Go
on: [push]
jobs:
build:
runs-on: ubuntu-latest
env:
HAS_CHRONY: True
steps:
- uses: actions/checkout@v4
- name: Install Chrony
run: |
sudo apt-get update
sudo apt-get upgrade
sudo apt-get install libgnutls28-dev
sudo apt-get install gnutls-bin
sudo apt-get install libtomcrypt-dev
sudo apt-get install nettle-dev
curl -LO https://chrony-project.org/releases/chrony-4.6.1.tar.gz
tar -xzvf chrony-4.6.1.tar.gz
mv chrony-4.6.1 chrony-4.6.1-src
mkdir chrony-4.6.1
cd chrony-4.6.1-src/
./configure --prefix=/home/ubuntu/chrony-4.6.1
make
sudo make install
- name: Start Chrony
run: |
sh testnet/tls-gen-cert.sh
sudo systemctl stop chronyd
sudo /home/ubuntu/chrony-4.6.1/sbin/chronyd -4 -f /home/runner/work/scion-time/scion-time/testnet/chrony/chronyNTS.conf
sleep 10
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: '1.23.2'
- name: go build
run: go build -o bin/timeservice
- name: go vet
run: go vet ./...
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@latest
$(go env GOPATH)/bin/govulncheck ./...
- name: staticcheck
run: |
go install honnef.co/go/tools/cmd/staticcheck@latest
$(go env GOPATH)/bin/staticcheck -checks "all,-ST1000" ./...
- name: golangci-lint
run: |
curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.60.1
$(go env GOPATH)/bin/golangci-lint run
- name: go test
run: go test example.com/scion-time/...