forked from stevedonovan/luar
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from vxcontrol/add_386_support
Added i386 arch support in rmx dependency
- Loading branch information
Showing
3 changed files
with
85 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,80 @@ | ||
name: Test | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
env: | ||
CGO_ENABLED: 1 | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
arch: | ||
- i386 | ||
- amd64 | ||
go: | ||
- '1.19' | ||
- '1.20' | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup Go | ||
uses: actions/[email protected] | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Install gcc | ||
if: matrix.arch == 'amd64' | ||
run: | | ||
sudo apt update | ||
sudo apt install gcc -y | ||
- name: Install gcc-multilib | ||
if: matrix.arch == 'i386' | ||
run: | | ||
sudo dpkg --add-architecture i386 | ||
sudo apt update | ||
sudo apt install gcc-multilib -y | ||
# amd64 | ||
- name: 'Build with ${{ matrix.go }} for amd64' | ||
if: ${{ matrix.arch == 'amd64' }} | ||
run: go build -race -v ./... | ||
|
||
- name: 'Test with ${{ matrix.go }} for amd64' | ||
if: ${{ matrix.arch == 'amd64' }} | ||
run: go test -race -v ./... | ||
|
||
- name: 'Bench with ${{ matrix.go }} for amd64' | ||
if: ${{ matrix.arch == 'amd64' }} | ||
run: go test -bench=. -benchmem -race -v ./... | ||
|
||
# 386 | ||
- name: 'Build with ${{ matrix.go }} for i386' | ||
if: ${{ matrix.arch == 'i386' }} | ||
env: | ||
CGOENABLED: true | ||
GOARCH: 386 | ||
CGO_LDFLAGS: -static | ||
run: | | ||
go test -c -v ./... | ||
- name: 'Test and Bench with ${{ matrix.go }} on i386' | ||
if: ${{ matrix.arch == 'i386' }} | ||
uses: vxcontrol/[email protected] | ||
with: | ||
arch: i386 | ||
distro: bullseye | ||
dockerRunArgs: --mount type=bind,source="$(pwd)",target=/checkout,readonly | ||
run: | | ||
find /checkout -name '*.test' -type f -executable -print0 | \ | ||
xargs -t -0 -I '{}' sh -c '{} -test.v && {} -test.bench=. -test.benchmem -test.v' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
github.com/vxcontrol/golua v1.2.1 h1:vCfL3Z2WTGkgwPPsg3/SAVycOeU9y7iZ3dKtkSLfpYs= | ||
github.com/vxcontrol/golua v1.2.1/go.mod h1:26j63zy6Cb44iDabdQKZp5l6kR1PY+v26nO+T7tZFtE= | ||
github.com/vxcontrol/rmx v1.0.0 h1:tUOStV2fXBm4xrtSjIye4bLHI0ud/IhkvMbaeMyp8ts= | ||
github.com/vxcontrol/rmx v1.0.0/go.mod h1:1styoLiLxmoRJtwR6cjrcrt5LheQcFP+dXcSgr3W8ZQ= | ||
github.com/vxcontrol/golua v1.3.0 h1:kjNNG+oL/bKSpDBMBQwzPgSDDrxoG9xVrNlVKxmWCoI= | ||
github.com/vxcontrol/golua v1.3.0/go.mod h1:IsfilvnfNXs9C5maGYflqqUdX4igeeskG3lhYofqg3Q= | ||
github.com/vxcontrol/rmx v1.1.0 h1:iKkzPj0pkqe/DBS2XkOZn+i8GxbtJiFKEPCqOr8/2wE= | ||
github.com/vxcontrol/rmx v1.1.0/go.mod h1:1styoLiLxmoRJtwR6cjrcrt5LheQcFP+dXcSgr3W8ZQ= |