Skip to content

Go 1.21 more fixes #145

Go 1.21 more fixes

Go 1.21 more fixes #145

Workflow file for this run

name: goloader
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build:
env:
GOPATH: ${{ github.workspace }}
GO111MODULE: auto
strategy:
fail-fast: false
matrix:
go-version: [ 1.18.X, 1.19.X, 1.20.X , 1.21.X ]
os: [ubuntu-latest, windows-latest, macos-latest, [self-hosted, Linux, ARM64], [self-hosted, macOS, ARM64]]
cgo-enabled: ["CGO_ENABLED=0", "CGO_ENABLED=1"]
dynlink: ["JIT_GC_DYNLINK=1", "JIT_GC_DYNLINK=0"]
runs-on: ${{ matrix.os }}
steps:
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: ${{ matrix.go-version }}
check-latest: true
cache-dependency-path: jit/go.sum
- name: Rename cmd/internal
shell: sh
run: |
eval $(go env | sed -r 's/^(set )?(\w+)=("|'"'"'?)(.*)\3$/\2="\4"/g') && cp -r $GOROOT/src/cmd/internal $GOROOT/src/cmd/objfile
- name: Patch gc
shell: sh
run:
go run -a github.com/eh-steve/goloader/jit/patchgc@2aedbae4eb66fb4d0a4f24efbeb1873007792bca
- name: Checkout code
uses: actions/checkout@v3
with:
path: ${{ env.GOPATH }}/src/github.com/${{ github.repository }}
- name: Test
shell: sh
run:
cd $GOPATH/src/github.com/eh-steve/goloader/jit && export ${{ matrix.cgo-enabled }} ${{ matrix.dynlink }} && go test -a -c . && ./jit.test -test.v