Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP][go1.20] Working on go1.20 native overrides #1283

Draft
wants to merge 190 commits into
base: go1.20
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
190 commits
Select commit Hold shift + click to select a range
7b4eb0f
Updated the linkname to handle new directives
grantnelson-wf Apr 2, 2024
6805770
Adding some updates
grantnelson-wf Apr 2, 2024
1317857
purging some unneeded methods
grantnelson-wf Apr 2, 2024
e89fa96
removing temp.txt dump file
grantnelson-wf Apr 2, 2024
a0d9755
Updating crypto
grantnelson-wf Apr 3, 2024
f7218c1
Updated crypto
grantnelson-wf Apr 3, 2024
baf6678
Fixed http use of atomic pointer
grantnelson-wf Apr 3, 2024
002cfe4
Fixed self referencing links
grantnelson-wf Apr 3, 2024
4415fb0
Updated the linkname to handle new directives
grantnelson-wf Apr 2, 2024
45a558d
Merge branch 'updateLinkname' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Apr 3, 2024
cdd523b
Updated the linkname to handle new directives
grantnelson-wf Apr 2, 2024
dfeb70c
Merge branch 'updateLinkname' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Apr 3, 2024
f07226e
Touchup the linkname update
grantnelson-wf Apr 3, 2024
8ba1a1f
Merge branch 'updateLinkname' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Apr 3, 2024
fd5c620
Updating crypto sublte xor overrides
grantnelson-wf Apr 3, 2024
6472867
Merge branch 'subtleXor' of github.com:Workiva/gopherjs into workingO…
grantnelson-wf Apr 3, 2024
df3496e
Merge branch 'subtleXor' of github.com:Workiva/gopherjs into workingO…
grantnelson-wf Apr 8, 2024
dcfcb7d
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 9, 2024
bb2df97
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 9, 2024
81b5fc3
Working on fixedbugs/issues
grantnelson-wf Apr 9, 2024
64162ee
Working on fixedbugs/issues
grantnelson-wf Apr 9, 2024
88ff565
Fixed the var link in cgo
grantnelson-wf Apr 10, 2024
ad564b5
Update build constraint checks
grantnelson-wf Apr 10, 2024
676ef5a
Undoing tags update to instead match changes to go/test/run.go
grantnelson-wf Apr 10, 2024
a52c6c1
Updating to match changes to go/test/run.go
grantnelson-wf Apr 11, 2024
6e6162d
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
90d474e
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
72ff7e3
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
90ed493
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
6f02db7
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
652feaa
Pulling back some changes to run.go
grantnelson-wf Apr 11, 2024
bfd15d6
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 11, 2024
ddebeb6
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 16, 2024
2ec76a8
Merge branch 'mergeMaster' of github.com:Workiva/gopherjs into workin…
grantnelson-wf Apr 16, 2024
a0dc317
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 18, 2024
90c7868
Updating testing example.go
grantnelson-wf Apr 18, 2024
e093117
Updated godebug setUpdate
grantnelson-wf Apr 18, 2024
0c908e4
Doing some cleanup
grantnelson-wf Apr 18, 2024
18ab043
Removing generics overrides
grantnelson-wf Apr 18, 2024
f200ab8
Removing generics overrides
grantnelson-wf Apr 18, 2024
d3314f1
Removing generics overrides
grantnelson-wf Apr 18, 2024
3ce79d7
Removing generics overrides
grantnelson-wf Apr 18, 2024
b68671c
Removing generic overrides that are no longer needed
grantnelson-wf Apr 18, 2024
1114f24
Working on gorepo
grantnelson-wf Apr 18, 2024
f819697
Updating known fails for gorepo
grantnelson-wf Apr 18, 2024
6aef801
Merge branch 'updateKnownFails' of github.com:Workiva/gopherjs into w…
grantnelson-wf Apr 19, 2024
52275f4
Merge branch 'cleanGenericsOverrides' of github.com:Workiva/gopherjs …
grantnelson-wf Apr 19, 2024
4403e4b
Merge branch 'updateTestRunExample' of github.com:Workiva/gopherjs in…
grantnelson-wf Apr 19, 2024
05955a6
fix merge mistake
grantnelson-wf Apr 19, 2024
dc407c6
updating known failures
grantnelson-wf Apr 19, 2024
70d9464
Merge branch 'updateKnownFails' of github.com:Workiva/gopherjs into w…
grantnelson-wf Apr 19, 2024
7007a46
remove some testing code
grantnelson-wf Apr 19, 2024
eb1a98e
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Apr 22, 2024
f7026da
Got gorepo/run.go running
grantnelson-wf Apr 23, 2024
8feee13
Removing unneeded prune of imports from build
grantnelson-wf Apr 23, 2024
5f306a3
candidate for sliceData built-in
grantnelson-wf Apr 23, 2024
efb9a2c
Correctly typed slideData
grantnelson-wf Apr 24, 2024
dc31d02
Added nil testing to SliceData
grantnelson-wf Apr 25, 2024
4c32459
Added a comment to SliceData
grantnelson-wf Apr 25, 2024
9926aed
Updating bcache override
grantnelson-wf Apr 25, 2024
eb0ddf7
Overriding an unsafe.String
grantnelson-wf Apr 25, 2024
3b9b7de
Updated signatures in clientserver_test
grantnelson-wf Apr 25, 2024
5bd55cc
Fixing cache_test.go
grantnelson-wf Apr 25, 2024
5f26960
Cleaning up gorepo from experiments
grantnelson-wf Apr 25, 2024
b9384be
Fixing cache_test.go
grantnelson-wf Apr 25, 2024
e1b1dcb
Merge branch 'gorepoTestTimeout' of github.com:Workiva/gopherjs into …
grantnelson-wf Apr 26, 2024
c702160
Reducing the number of expression formatting in SliceData
grantnelson-wf May 2, 2024
befe8df
Merge branch 'addUnsafeSliceData' of github.com:Workiva/gopherjs into…
grantnelson-wf May 2, 2024
6f15b82
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 2, 2024
b3a6078
Added runtime set and unset env
grantnelson-wf May 2, 2024
b07854f
Add a link to fastrand64 into math/rand
grantnelson-wf May 2, 2024
c7add00
Add unsafe for link
grantnelson-wf May 2, 2024
bff3255
Merge branch 'internalizingNulls' of github.com:Workiva/gopherjs into…
grantnelson-wf May 3, 2024
a0eaa4b
Fixing strings tests
grantnelson-wf May 3, 2024
6081da0
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 6, 2024
3d8a85e
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 7, 2024
1c9d76b
Working on unsafe.SliceData
grantnelson-wf May 8, 2024
86cf474
Fixes to unsafe.SliceData
grantnelson-wf May 8, 2024
f2f0627
Merge branch 'addUnsafeSliceData' of github.com:Workiva/gopherjs into…
grantnelson-wf May 8, 2024
138c6b6
Adding back in overrides to crypto
grantnelson-wf May 8, 2024
3aaef46
Adding back in overrides to godebug
grantnelson-wf May 8, 2024
3887460
Adding back in overrides to atomic
grantnelson-wf May 8, 2024
f855e86
Adding back in overrides to gob
grantnelson-wf May 8, 2024
1d582c2
Adding back in overrides to token position
grantnelson-wf May 8, 2024
a18b2fe
Adding back in overrides to http
grantnelson-wf May 8, 2024
0ef8838
Adding back in overrides to map
grantnelson-wf May 8, 2024
b1aeef3
Adding back in overrides to time
grantnelson-wf May 8, 2024
eaf7664
Adding back in overrides to reflects
grantnelson-wf May 8, 2024
b88e0f5
Adding back in overrides to testing
grantnelson-wf May 8, 2024
d6863c2
Adding back in overrides to time format
grantnelson-wf May 8, 2024
67a4a2d
Undoing a comment
grantnelson-wf May 8, 2024
815e712
Working on pointer override
grantnelson-wf May 8, 2024
dcecc94
Working on overrides for unit-tests
grantnelson-wf May 8, 2024
a382c95
Working on overrides for unit-tests
grantnelson-wf May 8, 2024
f0a817c
Updating overrides for crypto
grantnelson-wf May 8, 2024
504352d
Some native overrides for go1.20
grantnelson-wf May 8, 2024
ce3f8cc
Merge branch 'nativesBatch2' of github.com:Workiva/gopherjs into work…
grantnelson-wf May 8, 2024
5c48676
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 13, 2024
25731b0
Some native overrides for go1.20
grantnelson-wf May 8, 2024
cecb4e6
Merge branch 'nativesBatch2' of github.com:Workiva/gopherjs into work…
grantnelson-wf May 15, 2024
f6a2036
Adding most basic override to Nat uint32 problem
grantnelson-wf May 21, 2024
a16deee
Trying a different way of solving the uint32 problem in crypto
grantnelson-wf May 21, 2024
cd12395
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 23, 2024
6034a76
Merge branch 'atomicPntrOverrides' of github.com:Workiva/gopherjs int…
grantnelson-wf May 23, 2024
8d751cc
Merge branch 'g1.20overridesA' of github.com:Workiva/gopherjs into wo…
grantnelson-wf May 23, 2024
397c611
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 28, 2024
8d140c0
Merge branch 'updatingCrypto' of github.com:Workiva/gopherjs into wor…
grantnelson-wf May 28, 2024
3db0eca
Working on setUpdate
grantnelson-wf May 28, 2024
2099c41
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf May 29, 2024
459eda4
Fixing name
grantnelson-wf May 29, 2024
c0877f6
Reworking setUpdate
grantnelson-wf May 29, 2024
421ffbf
Updating setUpdate godebug
grantnelson-wf May 29, 2024
ce0b73b
Cleaned up godebug
grantnelson-wf May 30, 2024
46f5363
Fix indents
grantnelson-wf May 30, 2024
c3a6441
Fixing AnyOverlap
grantnelson-wf May 31, 2024
4ca1283
Fixing AnyOverlap
grantnelson-wf May 31, 2024
3bcfdd3
Fixing AnyOverlap
grantnelson-wf May 31, 2024
44d6401
Fixing AnyOverlap
grantnelson-wf May 31, 2024
8d32c49
Fixing AnyOverlap
grantnelson-wf May 31, 2024
834e190
Fixing AnyOverlap
grantnelson-wf May 31, 2024
be1cb06
Fixing env watcher for godebug
grantnelson-wf May 31, 2024
e08899b
Merge branch 'godebugUpdate' of github.com:Workiva/gopherjs into work…
grantnelson-wf May 31, 2024
def9bca
Fixing AnyOverlap
grantnelson-wf May 31, 2024
00bd305
Fixing AnyOverlap
grantnelson-wf May 31, 2024
ee079de
Fixing AnyOverlap
grantnelson-wf May 31, 2024
4580bf0
Fixing AnyOverlap
grantnelson-wf May 31, 2024
b0753a9
Fixing AnyOverlap
grantnelson-wf May 31, 2024
e351689
Fixing AnyOverlap
grantnelson-wf May 31, 2024
394cf53
Adding reflect Grow
grantnelson-wf May 31, 2024
46429a4
Merge branch 'updateAnyOverlap' of github.com:Workiva/gopherjs into w…
grantnelson-wf May 31, 2024
352005b
Merge branch 'godebugUpdate' of github.com:Workiva/gopherjs into work…
grantnelson-wf Jun 3, 2024
d136379
Removing old stuff
grantnelson-wf Jun 3, 2024
9ba1ca2
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jun 3, 2024
94c5321
Filling out Value.Grow
grantnelson-wf Jun 3, 2024
40aa2e1
Working on Grow
grantnelson-wf Jun 4, 2024
cc57095
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jun 4, 2024
a2e80ed
Working on Grow
grantnelson-wf Jun 4, 2024
5610925
Adding reflect Grow
grantnelson-wf Jun 4, 2024
d911660
Merge branch 'addReflectGrow' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Jun 4, 2024
9ee247c
bump
grantnelson-wf Jun 4, 2024
ad9f304
Working on growSlice issue
grantnelson-wf Jun 4, 2024
b3c0b51
Working on growSlice issue
grantnelson-wf Jun 4, 2024
3e85ba5
Working on growSlice issue
grantnelson-wf Jun 4, 2024
9bac56a
Working on growSlice issue
grantnelson-wf Jun 4, 2024
05a24f8
Working on growSlice issue
grantnelson-wf Jun 4, 2024
76345b1
Working on growSlice issue
grantnelson-wf Jun 4, 2024
4851d0d
Working on Append
grantnelson-wf Jun 4, 2024
10fb108
Merge branch 'addReflectGrow' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Jun 4, 2024
3a8ee85
Working on extendSlice
grantnelson-wf Jun 4, 2024
98d2501
Working on reflect and removing unsafeheader
grantnelson-wf Jun 6, 2024
2653c4e
Working on reflect
grantnelson-wf Jun 6, 2024
db7f7a3
Working on reflect
grantnelson-wf Jun 6, 2024
545b7d5
Debugging grow and field
grantnelson-wf Jun 11, 2024
8dcc666
Oops, removing js file
grantnelson-wf Jun 11, 2024
595cc0c
Debugging nil growth
grantnelson-wf Jun 12, 2024
6b0017e
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jun 12, 2024
b3a013b
Updating tests
grantnelson-wf Jun 12, 2024
15d522c
Merge branch 'addReflectGrow' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Jun 12, 2024
7a79c9c
Implemented SemacquireRWMutex
grantnelson-wf Jun 13, 2024
5fea1c7
Made changes per suggestions and help
grantnelson-wf Jun 26, 2024
60ca3ef
Merge branch 'addReflectGrow' of github.com:Workiva/gopherjs into wor…
grantnelson-wf Jun 26, 2024
40c0b52
Working on reflect for go1.20
grantnelson-wf Jun 26, 2024
4037511
fixing cvtSliceArray
grantnelson-wf Jun 28, 2024
a3162a6
Trying to figure out cvtSliceArray
grantnelson-wf Jul 1, 2024
0990476
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 2, 2024
bf66c71
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 8, 2024
42acfc2
Moving from CircleCI to GHA
grantnelson-wf Jun 20, 2024
fb81bbe
Merge branch 'fixingMoreReflect' of github.com:Workiva/gopherjs into …
grantnelson-wf Jul 11, 2024
54c2172
Appear to have gotten cvtSliceArray working
grantnelson-wf Jul 12, 2024
837c24a
Fixed UnsafePointer to use Pointer
grantnelson-wf Jul 12, 2024
f8d823b
Merge branch 'add2Reflects' of github.com:Workiva/gopherjs into worki…
grantnelson-wf Jul 12, 2024
d8fba87
Merge branch 'add3Reflects' of github.com:Workiva/gopherjs into worki…
grantnelson-wf Jul 12, 2024
424d10e
fixed encoding/gob
grantnelson-wf Jul 15, 2024
c883b7a
Merge branch 'fixGob' of github.com:Workiva/gopherjs into workingOnGo20
grantnelson-wf Jul 15, 2024
3aa58ea
Merge branch 'gha2' of github.com:Workiva/gopherjs into workingOnGo20
grantnelson-wf Jul 16, 2024
9c14c4c
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 16, 2024
5427c56
Changed repreat code back to go1.19 implementation
grantnelson-wf Jul 16, 2024
d157d13
Changing repeat to use JS
grantnelson-wf Jul 16, 2024
d397c8f
Going back to go1.19 version of repeat
grantnelson-wf Jul 16, 2024
68b79a0
Adding fail-fast: false to the CI
grantnelson-wf Jul 17, 2024
7c6b932
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 17, 2024
f8ca4f4
Moving from CircleCI to GHA
grantnelson-wf Jun 20, 2024
df5759f
Merge branch 'repeatStringRepeat' of github.com:Workiva/gopherjs into…
grantnelson-wf Jul 17, 2024
e9984b7
Merge branch 'gha2' of github.com:Workiva/gopherjs into workingOnGo20
grantnelson-wf Jul 17, 2024
c2085a8
Added generics to measure-size.yml
grantnelson-wf Jul 17, 2024
8c15d1d
Merge pull request #1317 from Workiva/gha2
nevkontakte Jul 17, 2024
1ad55ee
Added test showing issue in compiler conversion
grantnelson-wf Jul 17, 2024
da96406
Merge branch 'go1.20' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 17, 2024
7887c96
Merge branch 'master' of github.com:gopherjs/gopherjs into workingOnGo20
grantnelson-wf Jul 17, 2024
93996d1
Skipping some bad tests in crypto/tls
grantnelson-wf Jul 18, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/actions/setup-gopherjs/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Setup GopherJS
description: Sets up Go, Node.js, and GopherJS

inputs:
includeSyscall:
description: Indicates that the node-syscall package should be installed.
required: true
default: 'false'

fixTemps:
description: Indicates that the Windows Temp variables should be fixed.
required: true
default: 'false'

runs:
using: composite
steps:
- name: Fix Windows Temp Variables
if: inputs.fixTemps == 'true'
shell: pwsh
run: |
# see https://github.com/actions/runner-images/issues/712#issuecomment-613004302
echo "TEMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
echo "TMP=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8
echo "TMPDIR=$env:USERPROFILE\AppData\Local\Temp" | Out-File -FilePath $env:GITHUB_ENV -Append -Encoding utf8

- name: Setup Go
uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}

- name: Setup Go Environment
working-directory: ${{ env.GOPHERJS_PATH }}
shell: bash
run: echo "GOROOT=$(go env GOROOT)" >> $GITHUB_ENV

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ env.NODE_VERSION }}

- name: Install Node.js for non-Linux
if: inputs.includeSyscall != 'true'
working-directory: ${{ env.GOPHERJS_PATH }}
shell: bash
# Install required Node.js packages without optional (node-syscall).
run: npm install --omit=optional --no-package-lock

- name: Install Node.js for Linux
if: inputs.includeSyscall == 'true'
working-directory: ${{ env.GOPHERJS_PATH }}
shell: bash
# Install required Node.js packages including optional (node-syscall).
run: |
npm install --include=optional --no-package-lock

- name: Setup Node.js Environment
working-directory: ${{ env.GOPHERJS_PATH }}
shell: bash
# Make nodejs able to require installed modules from any working path.
run: echo "NODE_PATH=$(npm root)" >> $GITHUB_ENV

- name: Install GopherJS
working-directory: ${{ env.GOPHERJS_PATH }}
shell: bash
run: go install -v

- name: Setup information
shell: bash
run: |
echo ::notice::go version: $(go version)
echo ::notice::node version: $(node -v)
echo ::notice::npm version: $(npm -v)
echo ::notice::gopherjs version: $(gopherjs version)
221 changes: 221 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,221 @@
name: CI

on:
push:
branches: [ "*" ]
pull_request:
branches: [ "*" ]

permissions:
contents: read

concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true

env:
GO_VERSION: 1.20.14
NODE_VERSION: 12
GOLANGCI_VERSION: v1.53.3
GOPHERJS_EXPERIMENT: generics
SOURCE_MAP_SUPPORT: true
GOPATH: ${{ github.workspace }}/go
GOPHERJS_PATH: ${{ github.workspace }}/go/src/github.com/${{ github.repository }}

jobs:
ubuntu_smoke:
name: Ubuntu Smoke
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
with:
includeSyscall: 'true'
- name: Test GopherJS
working-directory: ${{ env.GOPHERJS_PATH }}
run: go test -v -short ./...
- name: Run Tests
working-directory: ${{ env.GOPHERJS_PATH }}
run: |
gopherjs build -v net/http
gopherjs test -v --short fmt log ./tests

windows_smoke:
name: Window Smoke
runs-on: windows-latest
env:
# Windows does not support source maps.
SOURCE_MAP_SUPPORT: false
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
with:
fixTemps: 'true'
- name: Test GopherJS
working-directory: ${{ env.GOPHERJS_PATH }}
run: go test -v -short ./...
- name: Run Tests
working-directory: ${{ env.GOPHERJS_PATH }}
run: |
gopherjs build -v net/http
gopherjs test -v --short fmt sort ./tests

darwin_smoke:
name: Darwin Smoke
runs-on: macos-latest
env:
# Node version '12' is not found for darwin.
NODE_VERSION: 20
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
- name: Test GopherJS
working-directory: ${{ env.GOPHERJS_PATH }}
run: go test -v -short ./...
- name: Run Tests
working-directory: ${{ env.GOPHERJS_PATH }}
run: |
gopherjs build -v net/http
gopherjs test -v --short fmt log os ./tests

lint:
name: Lint Checks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- uses: actions/setup-go@v5
with:
go-version: ${{ env.GO_VERSION }}
- name: Install golangci-lint
uses: golangci/golangci-lint-action@v3
with:
working-directory: ${{ env.GOPHERJS_PATH }}
version: ${{ env.GOLANGCI_VERSION }}
only-new-issues: true
- name: Check go.mod
working-directory: ${{ env.GOPHERJS_PATH }}
run: go mod tidy && git diff --exit-code
- name: Check natives build tags
working-directory: ${{ env.GOPHERJS_PATH }}
# All those packages should have // +build js.
run: diff -u <(echo -n) <(go list ./compiler/natives/src/...)

go_tests:
name: Go Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
- name: Run Tests
working-directory: ${{ env.GOPHERJS_PATH }}
# Run all tests except gorepo tests.
run: go test -v -race $(go list ./... | grep -v github.com/gopherjs/gopherjs/tests/gorepo)

todomvc_check:
name: TodoMVC GO111MODULE Check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
- name: TodoMVC in GOPATH mode
working-directory: ${{ env.GOPHERJS_PATH }}
env:
GO111MODULE: off
GOPATH: /tmp/gopath
run: |
mkdir -p $GOPATH/src/github.com/gopherjs/gopherjs
cp -r -p ${{ env.GOPHERJS_PATH }}/. $GOPATH/src/github.com/gopherjs/gopherjs/
go get -v github.com/gopherjs/todomvc
gopherjs build -v -o /tmp/todomvc_gopath.js github.com/gopherjs/todomvc
gopherjs test -v github.com/gopherjs/todomvc/...
find $GOPATH
- name: TodoMVC in Go Modules mode
env:
GO111MODULE: on
GOPATH: /tmp/gmod
run: |
mkdir -p $GOPATH/src
cd /tmp
git clone --depth=1 https://github.com/gopherjs/todomvc.git
cd /tmp/todomvc
gopherjs build -v -o /tmp/todomvc_gomod.js github.com/gopherjs/todomvc
gopherjs test -v github.com/gopherjs/todomvc/...
find $GOPATH
- name: Compare GOPATH and Go Modules output
run: |
diff -u \
<(sed 's/todomvc_gomod.js.map/todomvc_ignored.js.map/' /tmp/todomvc_gomod.js) \
<(sed 's/todomvc_gopath.js.map/todomvc_ignored.js.map/' /tmp/todomvc_gopath.js)

gopherjs_tests:
name: GopherJS Tests (${{ matrix.filter.name }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
filter:
- name: non-crypto
pattern: '-Pve "^crypto"'
- name: cypto
pattern: '-Pe "^crypto"'
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
- name: Run GopherJS tests
working-directory: ${{ env.GOPHERJS_PATH }}
run: |
PACKAGE_NAMES=$( \
GOOS=js GOARCH=wasm go list std github.com/gopherjs/gopherjs/js/... github.com/gopherjs/gopherjs/tests/... \
| grep -v -x -f .std_test_pkg_exclusions \
| grep ${{ matrix.filter.pattern }} \
)
echo "Running tests for packages:"
echo "$PACKAGE_NAMES"
gopherjs test -p 4 --minify -v --short $PACKAGE_NAMES

gorepo_tests:
name: Gorepo Tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
path: ${{ env.GOPHERJS_PATH }}
- name: Copy Actions
run: cp -r ${{ env.GOPHERJS_PATH }}/.github .
- name: Setup GopherJS
uses: ./.github/actions/setup-gopherjs/
- name: Run GopherJS tests
working-directory: ${{ env.GOPHERJS_PATH }}
run: go test -v github.com/gopherjs/gopherjs/tests/gorepo
25 changes: 0 additions & 25 deletions .github/workflows/lint.yaml

This file was deleted.

13 changes: 8 additions & 5 deletions .github/workflows/measure-size.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,27 +2,30 @@ name: Measure canonical app size

on: ['pull_request']

env:
GO_VERSION: '~1.20.14'
GOPHERJS_EXPERIMENT: generics

jobs:
measure:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-go@v2
- uses: actions/setup-go@v5
with:
go-version: '~1.20.14'
go-version: ${{ env.GO_VERSION }}
- uses: gopherjs/output-size-action/measure@main
with:
name: jQuery TodoMVC
repo: https://github.com/gopherjs/todomvc
go-package: github.com/gopherjs/todomvc
report_json: /tmp/report.json
report_md: /tmp/report.md
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: size_report
path: |
/tmp/report.json
/tmp/report.md

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

[![GoDoc](https://godoc.org/github.com/gopherjs/gopherjs/js?status.svg)](https://godoc.org/github.com/gopherjs/gopherjs/js)
[![Sourcegraph](https://sourcegraph.com/github.com/gopherjs/gopherjs/-/badge.svg)](https://sourcegraph.com/github.com/gopherjs/gopherjs?badge)
[![Circle CI](https://circleci.com/gh/gopherjs/gopherjs.svg?style=svg)](https://circleci.com/gh/gopherjs/gopherjs)
[![Github Actions CI](https://github.com/gopherjs/gopherjs/actions/workflows/ci.yaml/badge.svg)](https://github.com/gopherjs/gopherjs/actions/workflows/ci.yaml)

GopherJS compiles Go code ([go.dev](https://go.dev/)) to pure JavaScript code. Its main purpose is to give you the opportunity to write front-end code in Go which will still run in all browsers.

Expand Down
Loading
Loading