Skip to content

Commit

Permalink
wip
Browse files Browse the repository at this point in the history
  • Loading branch information
aybabtme committed Nov 4, 2024
1 parent 6ba0cdc commit 8aff90c
Show file tree
Hide file tree
Showing 2 changed files with 72 additions and 12 deletions.
44 changes: 32 additions & 12 deletions .github/workflows/release-dev-pro.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,34 +11,54 @@ permissions:

jobs:
build:
name: "build"
strategy:
matrix:
go: [stable]
os:
- ubuntu-latest
- macos-latest
arch:
- arm64
- amd64
runs-on: ${{ matrix.os }}
targets:
- name: linux-amd64
runner: ubuntu-latest
goos: linux
goarch: amd64
- name: linux-arm64
runner: ubuntu-latest
goos: linux
goarch: arm64
goenvs: CC=aarch64-linux-gnu-gcc
preinstall: apt install -y gcc-aarch64-linux-gnu
- name: darwin-amd64
runner: macos-latest
goos: darwin
goarch: amd64
- name: darwin-arm64
runner: macos-latest
goos: darwin
goarch: arm64
goenvs: CC=oa64-clang
preinstall: bash -c "$(wget -O - https://apt.llvm.org/llvm.sh)"
name: ${{ matrix.targets.name }}
runs-on: ${{ matrix.targets.runner }}
env:
GOPRIVATE: "github.com/humanlogio/humanlog-pro"
GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }}
GOARCH: ${{ matrix.arch }}
CGO_ENABLED: 1
GOBIN: /usr/local/bin/
steps:
- name: Set up Go 1
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
go-version: stable
cache: true
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run:
if: ${{ matrix.targets.preinstall != '' }}

- run: git config --global --add safe.directory '*'
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- run: go install github.com/goware/modvendor@latest
- run: go mod vendor
- run: modvendor -copy="**/*.a **/*.h" -v
- run: go build -tags pro -o /tmp/humanlog-${{ matrix.os }}-${{ matrix.arch }} ./cmd/humanlog
- run: ${{ matrix.targets.goenvs }} go build -tags pro -o /tmp/humanlog-${{ matrix.targets.goos }}-${{ matrix.targets.goarch }} ./cmd/humanlog
env:
GOOS: ${{ matrix.targets.goos }}
GOARCH: ${{ matrix.targets.goarch }}
40 changes: 40 additions & 0 deletions .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,49 @@ permissions:
contents: write

jobs:
build:
name: "build"
strategy:
matrix:
go: [stable]
os:
- ubuntu-latest
- macos-latest
arch:
- arm64
- amd64
runs-on: ${{ matrix.os }}
env:
GOPRIVATE: "github.com/humanlogio/humanlog-pro"
GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }}
GOARCH: ${{ matrix.arch }}
steps:
- name: Set up Go 1
uses: actions/setup-go@v5
with:
go-version: ${{ matrix.go }}
cache: true
- uses: actions/checkout@v3
with:
fetch-depth: 0
- run: git config --global --add safe.directory '*'
- run: git config --global url.https://[email protected]/.insteadOf https://github.com/
- run: git fetch --force --tags
- run: echo "${HOME}/.humanlog/bin" >> $GITHUB_PATH
- run: curl https://humanlog.dev/install_apictl.sh | bash
- run: go install github.com/goware/modvendor@latest
- run: go mod vendor
- run: modvendor -copy="**/*.a **/*.h" -v
- run: go
env:



create_a_dev_release:
name: create a dev release
runs-on: ubuntu-latest
container:
image: ghcr.io/goreleaser/goreleaser-cross:v1.23.2
env:
GOPRIVATE: "github.com/humanlogio/humanlog-pro"
GH_ACCESS_TOKEN_FOR_HUMANLOGPRO: ${{ secrets.GH_ACCESS_TOKEN_FOR_HUMANLOGPRO }}
Expand Down

0 comments on commit 8aff90c

Please sign in to comment.