7 Commits

Author SHA1 Message Date
080a1ce8d8 Merge branch 'master' into develop 2023-10-10 17:03:48 -04:00
9f94e43ebc github workflow 2023-10-10 01:37:59 -07:00
f35fd2aa7f Update go-main.yml 2023-10-10 04:20:05 -04:00
e0eb3313c2 Create go-dev.yml 2023-10-10 04:19:44 -04:00
d2395fe4eb Update and rename go.yml to go-main.yml 2023-10-10 04:18:02 -04:00
6c458a5724 Update go.yml 2023-10-10 04:16:33 -04:00
0001e056db Create go.yml 2023-10-10 04:15:28 -04:00
3 changed files with 60 additions and 2 deletions

33
.github/workflows/go-dev.yml vendored Normal file
View File

@@ -0,0 +1,33 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go Dev Build
on:
push:
branches: ["develop"]
pull_request:
branches: ["develop"]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: BuildWin64
uses: addnab/docker-run-action@v3
with:
image: x1unix/go-mingw:1.20
options: -v ${{ github.workspace }}:/go/work -w /go/work -e GOARCH=amd64 -e CGO_ENABLED=1
run: |
go build -o ./ifxmetrics_x64.dll -buildmode=c-shared -buildvcs=false -ldflags "-w -s -X main.EXTENSION_VERSION=${{github.ref_name}}-${{github.sha}}" ./extension/cmd
- name: BuildWin32
uses: addnab/docker-run-action@v3
with:
image: x1unix/go-mingw:1.20
options: -v ${{ github.workspace }}:/go/work -w /go/work -e GOARCH=386 -e CGO_ENABLED=1
run: |
go build -o ./ifxmetrics.dll -buildmode=c-shared -buildvcs=false -ldflags "-w -s -X main.EXTENSION_VERSION=${{github.ref_name}}-${{github.sha}}" ./extension/cmd

25
.github/workflows/go-main.yml vendored Normal file
View File

@@ -0,0 +1,25 @@
# This workflow will build a golang project
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go
name: Go Main
on:
push:
branches: [ "master" ]
pull_request:
branches: [ "master" ]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: '1.20'
- name: Build
run: go build -v ./extension/cmd/...

View File

@@ -144,10 +144,10 @@ Run this from the project root.
docker build -t indifox926/build-a3go:linux-so -f ./build/Dockerfile.build . docker build -t indifox926/build-a3go:linux-so -f ./build/Dockerfile.build .
# Compile x64 Linux .so # Compile x64 Linux .so
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=amd64 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o ./ifxmetrics_x64.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=amd64 -e CGO_ENABLED=1 indifox926/build-a3go:linux-so go build -o ./ifxmetrics_x64.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
# Compile x86 Linux .so # Compile x86 Linux .so
docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1 -e CC=gcc indifox926/build-a3go:linux-so go build -o ./ifxmetrics.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd docker run --rm -it -v ${PWD}:/app -e GOOS=linux -e GOARCH=386 -e CGO_ENABLED=1 indifox926/build-a3go:linux-so go build -o ./ifxmetrics.so -linkshared -ldflags "-w -s -X main.EXTENSION_VERSION=${IFXMETRICS_BUILD_VER}" ./extension/cmd
``` ```
### ADDON: COMPILE USING HEMTT ### ADDON: COMPILE USING HEMTT