Merge pull request #102 from AnalogJ/xgo

pull/132/head
Jason Kulatunga 4 years ago committed by GitHub
commit 7dbe108e33
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -6,7 +6,7 @@ jobs:
build:
name: Build
runs-on: ubuntu-latest
container: golang:1.13
container: karalabe/xgo-1.13.x
env:
PROJECT_PATH: /go/src/github.com/analogj/scrutiny
CGO_ENABLED: 1
@ -14,9 +14,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v2
- name: Test
env:
GOOS: linux
GOARCH: amd64
run: |
mkdir -p $PROJECT_PATH
cp -a $GITHUB_WORKSPACE/* $PROJECT_PATH/
@ -24,88 +21,33 @@ jobs:
go mod vendor
go test -race -coverprofile=coverage.txt -covermode=atomic -v -tags "static" $(go list ./... | grep -v /vendor/)
- name: Build amd64
env:
GOOS: linux
GOARCH: amd64
- name: Build Binaries
run: |
apt-get update && apt-get install -y file
cd $PROJECT_PATH
echo "###### Build Web ######"
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=amd64" -o scrutiny-web-linux-amd64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
echo "###### Build Collector ######"
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=amd64" -o scrutiny-collector-metrics-linux-amd64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-amd64
chmod +x scrutiny-collector-metrics-linux-amd64
file scrutiny-web-linux-amd64
ldd scrutiny-web-linux-amd64 || true
file scrutiny-collector-metrics-linux-amd64
ldd scrutiny-collector-metrics-linux-amd64 || true
- name: Build arm
env:
GOOS: linux
GOARCH: arm
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm" -o scrutiny-web-linux-arm -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm" -o scrutiny-collector-metrics-linux-arm -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-arm
chmod +x scrutiny-collector-metrics-linux-arm
- name: Build arm64
env:
GOOS: linux
GOARCH: arm64
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm64" -o scrutiny-web-linux-arm64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm64" -o scrutiny-collector-metrics-linux-arm64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-arm64
chmod +x scrutiny-collector-metrics-linux-arm64
- name: Build windows
env:
GOOS: windows
GOARCH: amd64
run: |
cd $PROJECT_PATH
go build -ldflags "-X main.goos=windows -X main.goarch=amd64" -o scrutiny-web-windows-amd64.exe -tags "static" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-X main.goos=windows -X main.goarch=amd64" -o scrutiny-collector-metrics-windows-amd64.exe -tags "static" collector/cmd/collector-metrics/collector-metrics.go
- name: Build freebsd
env:
GOOS: freebsd
GOARCH: amd64
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=freebsd -X main.goarch=amd64" -o scrutiny-web-freebsd-amd64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=freebsd -X main.goarch=amd64" -o scrutiny-collector-metrics-freebsd-amd64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-freebsd-amd64
chmod +x scrutiny-collector-metrics-freebsd-amd64
make all
- name: Archive
uses: actions/upload-artifact@v2
with:
name: binaries.zip
path: |
${{ env.PROJECT_PATH }}/scrutiny-web-linux-amd64
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-amd64
${{ env.PROJECT_PATH }}/scrutiny-web-linux-arm64
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-arm64
${{ env.PROJECT_PATH }}/scrutiny-web-linux-arm
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-arm
${{ env.PROJECT_PATH }}/scrutiny-web-windows-amd64.exe
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-windows-amd64.exe
${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64
${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64
/build/scrutiny-web-linux-amd64
/build/scrutiny-collector-metrics-linux-amd64
/build/scrutiny-web-linux-arm64
/build/scrutiny-collector-metrics-linux-arm64
/build/scrutiny-web-linux-arm-5
/build/scrutiny-collector-metrics-linux-arm-5
/build/scrutiny-web-linux-arm-6
/build/scrutiny-collector-metrics-linux-arm-6
/build/scrutiny-web-linux-arm-7
/build/scrutiny-collector-metrics-linux-arm-7
/build/scrutiny-web-windows-4.0-amd64.exe
/build/scrutiny-collector-metrics-windows-4.0-amd64.exe
# /build/scrutiny-web-freebsd-amd64
# /build/scrutiny-collector-metrics-freebsd-amd64
- uses: codecov/codecov-action@v1
with:
file: ${{ env.PROJECT_PATH }}/coverage.txt
flags: unittests
fail_ci_if_error: true
fail_ci_if_error: false

@ -31,9 +31,6 @@ jobs:
version_metadata_path: ${{ github.event.inputs.version_metadata_path }}
github_token: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
- name: Test
env:
GOOS: linux
GOARCH: amd64
run: |
mkdir -p $PROJECT_PATH
cp -a $GITHUB_WORKSPACE/* $PROJECT_PATH/
@ -42,62 +39,11 @@ jobs:
go mod vendor
go test -v -tags "static" $(go list ./... | grep -v /vendor/)
- name: Build amd64
env:
GOOS: linux
GOARCH: amd64
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=amd64" -o scrutiny-web-linux-amd64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=amd64" -o scrutiny-collector-metrics-linux-amd64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-amd64
chmod +x scrutiny-collector-metrics-linux-amd64
- name: Build arm
env:
GOOS: linux
GOARCH: arm
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm" -o scrutiny-web-linux-arm -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm" -o scrutiny-collector-metrics-linux-arm -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-arm
chmod +x scrutiny-collector-metrics-linux-arm
- name: Build arm64
env:
GOOS: linux
GOARCH: arm64
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm64" -o scrutiny-web-linux-arm64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=linux -X main.goarch=arm64" -o scrutiny-collector-metrics-linux-arm64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-linux-arm64
chmod +x scrutiny-collector-metrics-linux-arm64
- name: Build windows
env:
GOOS: windows
GOARCH: amd64
- name: Build Binaries
run: |
cd $PROJECT_PATH
go build -ldflags "-X main.goos=windows -X main.goarch=amd64" -o scrutiny-web-windows-amd64.exe -tags "static" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-X main.goos=windows -X main.goarch=amd64" -o scrutiny-collector-metrics-windows-amd64.exe -tags "static" collector/cmd/collector-metrics/collector-metrics.go
- name: Build freebsd
env:
GOOS: freebsd
GOARCH: amd64
run: |
cd $PROJECT_PATH
go build -ldflags "-extldflags=-static -X main.goos=freebsd -X main.goarch=amd64" -o scrutiny-web-freebsd-amd64 -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
go build -ldflags "-extldflags=-static -X main.goos=freebsd -X main.goarch=amd64" -o scrutiny-collector-metrics-freebsd-amd64 -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x scrutiny-web-freebsd-amd64
chmod +x scrutiny-collector-metrics-freebsd-amd64
make all
- name: Commit
uses: EndBug/add-and-commit@v4 # You can change this to use a specific version
@ -131,7 +77,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-linux-amd64
asset_path: /build/scrutiny-web-linux-amd64
asset_name: scrutiny-web-linux-amd64
asset_content_type: application/octet-stream
- name: Release Asset - Collector - linux-amd64
@ -141,7 +87,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-amd64
asset_path: /build/scrutiny-collector-metrics-linux-amd64
asset_name: scrutiny-collector-metrics-linux-amd64
asset_content_type: application/octet-stream
@ -153,7 +99,7 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-linux-arm64
asset_path: /build/scrutiny-web-linux-arm64
asset_name: scrutiny-web-linux-arm64
asset_content_type: application/octet-stream
- name: Release Asset - Collector - linux-arm64
@ -163,48 +109,90 @@ jobs:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-arm64
asset_path: /build/scrutiny-collector-metrics-linux-arm64
asset_name: scrutiny-collector-metrics-linux-arm64
asset_content_type: application/octet-stream
- name: Release Asset - Web - linux-arm
- name: Release Asset - Web - linux-arm-5
id: upload-release-asset5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-linux-arm
asset_name: scrutiny-web-linux-arm
asset_path: /build/scrutiny-web-linux-arm-5
asset_name: scrutiny-web-linux-arm-5
asset_content_type: application/octet-stream
- name: Release Asset - Collector - linux-arm
- name: Release Asset - Collector - linux-arm-5
id: upload-release-asset6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-linux-arm
asset_name: scrutiny-collector-metrics-linux-arm
asset_path: /buildd/scrutiny-collector-metrics-linux-arm-5
asset_name: scrutiny-collector-metrics-linux-arm-5
asset_content_type: application/octet-stream
- name: Release Asset - Web - freebsd-amd64
id: upload-release-asset7
- name: Release Asset - Web - linux-arm-6
id: upload-release-asset5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64
asset_name: scrutiny-web-freebsd-amd64
asset_path: /build/scrutiny-web-linux-arm-6
asset_name: scrutiny-web-linux-arm-6
asset_content_type: application/octet-stream
- name: Release Asset - Collector - freebsd-amd64
id: upload-release-asset8
- name: Release Asset - Collector - linux-arm-6
id: upload-release-asset6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64
asset_name: scrutiny-collector-metrics-freebsd-amd64
asset_path: /buildd/scrutiny-collector-metrics-linux-arm-6
asset_name: scrutiny-collector-metrics-linux-arm-6
asset_content_type: application/octet-stream
- name: Release Asset - Web - linux-arm-7
id: upload-release-asset5
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /build/scrutiny-web-linux-arm-7
asset_name: scrutiny-web-linux-arm-7
asset_content_type: application/octet-stream
- name: Release Asset - Collector - linux-arm-7
id: upload-release-asset6
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
asset_path: /buildd/scrutiny-collector-metrics-linux-arm-7
asset_name: scrutiny-collector-metrics-linux-arm-7
asset_content_type: application/octet-stream
# - name: Release Asset - Web - freebsd-amd64
# id: upload-release-asset7
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-web-freebsd-amd64
# asset_name: scrutiny-web-freebsd-amd64
# asset_content_type: application/octet-stream
# - name: Release Asset - Collector - freebsd-amd64
# id: upload-release-asset8
# uses: actions/upload-release-asset@v1
# env:
# GITHUB_TOKEN: ${{ secrets.SCRUTINY_GITHUB_TOKEN }}
# with:
# upload_url: ${{ steps.create_release.outputs.upload_url }} # This pulls from the CREATE RELEASE step above, referencing it's ID to get its outputs object, which include a `upload_url`. See this blog post for more info: https://jasonet.co/posts/new-features-of-github-actions/#passing-data-to-future-steps
# asset_path: ${{ env.PROJECT_PATH }}/scrutiny-collector-metrics-freebsd-amd64
# asset_name: scrutiny-collector-metrics-freebsd-amd64
# asset_content_type: application/octet-stream

@ -0,0 +1,83 @@
export CGO_ENABLED = 1
BINARY=\
linux/amd64 \
linux/arm-5 \
linux/arm-6 \
linux/arm-7 \
linux/arm64 \
.PHONY: all $(BINARY)
all: $(BINARY) windows/amd64
$(BINARY): OS = $(word 1,$(subst /, ,$*))
$(BINARY): ARCH = $(word 2,$(subst /, ,$*))
$(BINARY): build/scrutiny-web-%:
@echo "building web binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ./webapp/backend/cmd/scrutiny/
chmod +x "/build/scrutiny-web-$(OS)-$(ARCH)"
file "/build/scrutiny-web-$(OS)-$(ARCH)" || true
ldd "/build/scrutiny-web-$(OS)-$(ARCH)" || true
@echo "building collector binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ./collector/cmd/collector-metrics/
chmod +x "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)"
file "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)" || true
ldd "/build/scrutiny-collector-metrics-$(OS)-$(ARCH)" || true
windows/amd64: export OS = windows
windows/amd64: export ARCH = amd64
windows/amd64:
@echo "building web binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-web -tags "static netgo sqlite_omit_load_extension" ./webapp/backend/cmd/scrutiny/
@echo "building collector binary (OS = $(OS), ARCH = $(ARCH))"
xgo -v --targets="$(OS)/$(ARCH)" -ldflags "-extldflags=-static -X main.goos=$(OS) -X main.goarch=$(ARCH)" -out scrutiny-collector-metrics -tags "static netgo" ./collector/cmd/collector-metrics/
freebsd/amd64: export GOOS = freebsd
freebsd/amd64: export GOARCH = amd64
freebsd/amd64:
mkdir -p /build
@echo "building web binary (OS = $(GOOS), ARCH = $(GOARCH))"
go build -ldflags "-extldflags=-static -X main.goos=$(GOOS) -X main.goarch=$(GOARCH)" -o /build/scrutiny-web-$(GOOS)-$(GOARCH) -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
chmod +x "/build/scrutiny-web-$(GOOS)-$(GOARCH)"
file "/build/scrutiny-web-$(GOOS)-$(GOARCH)" || true
ldd "/build/scrutiny-web-$(GOOS)-$(GOARCH)" || true
@echo "building collector binary (OS = $(GOOS), ARCH = $(GOARCH))"
go build -ldflags "-extldflags=-static -X main.goos=$(GOOS) -X main.goarch=$(GOARCH)" -o /build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH) -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)"
file "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)" || true
ldd "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)" || true
freebsd/386: export GOOS = freebsd
freebsd/386: export GOARCH = 386
freebsd/386:
mkdir -p /build
@echo "building web binary (OS = $(GOOS), ARCH = $(GOARCH))"
go build -ldflags "-extldflags=-static -X main.goos=$(GOOS) -X main.goarch=$(GOARCH)" -o /build/scrutiny-web-$(GOOS)-$(GOARCH) -tags "static netgo sqlite_omit_load_extension" webapp/backend/cmd/scrutiny/scrutiny.go
chmod +x "/build/scrutiny-web-$(GOOS)-$(GOARCH)"
file "/build/scrutiny-web-$(GOOS)-$(GOARCH)" || true
ldd "/build/scrutiny-web-$(GOOS)-$(GOARCH)" || true
@echo "building collector binary (OS = $(GOOS), ARCH = $(GOARCH))"
go build -ldflags "-extldflags=-static -X main.goos=$(GOOS) -X main.goarch=$(GOARCH)" -o /build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH) -tags "static netgo" collector/cmd/collector-metrics/collector-metrics.go
chmod +x "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)"
file "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)" || true
ldd "/build/scrutiny-collector-metrics-$(GOOS)-$(GOARCH)" || true
# clean:
# rm scrutiny-collector-metrics-* scrutiny-web-*

@ -0,0 +1,7 @@
FROM karalabe/xgo-1.13.x
WORKDIR /go/src/github.com/analogj/scrutiny
COPY . /go/src/github.com/analogj/scrutiny
RUN make all

16
docker/Vagrantfile vendored

@ -0,0 +1,16 @@
Vagrant.configure("2") do |config|
config.vm.guest = :freebsd
config.vm.synced_folder ".", "/vagrant", id: "vagrant-root", disabled: true
config.vm.box = "freebsd/FreeBSD-11.0-CURRENT"
config.ssh.shell = "sh"
config.vm.base_mac = "080027D14C66"
config.vm.provider :virtualbox do |vb|
vb.customize ["modifyvm", :id, "--memory", "1024"]
vb.customize ["modifyvm", :id, "--cpus", "1"]
vb.customize ["modifyvm", :id, "--hwvirtex", "on"]
vb.customize ["modifyvm", :id, "--audio", "none"]
vb.customize ["modifyvm", :id, "--nictype1", "virtio"]
vb.customize ["modifyvm", :id, "--nictype2", "virtio"]
end
end
Loading…
Cancel
Save