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

Merge Milestone 2 #219

Merged
merged 692 commits into from
Mar 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
692 commits
Select commit Hold shift + click to select a range
f91d15d
Merge pull request #134 from Darkren/fix/infinite-keep-alive-loop
jdknives Jan 28, 2020
36a8e60
Update vendor
Darkren Jan 28, 2020
13add47
Improve logging and route group closing procedure
Darkren Jan 28, 2020
56d828c
Merge branch 'milestone2' into fix/deregister-tp-#125
Jan 29, 2020
f02c2db
Update ManagedTransport to handle deregister better.
Jan 29, 2020
751674d
Merge branch 'fix/deregister-tp-#125' of github.com:evanlinjin/skywir…
Jan 29, 2020
fbb137c
Updated vendor.
Jan 29, 2020
7d5cd95
Temporarily disable 'make lint' in Travis.
Jan 29, 2020
6ebf225
Merge pull request #133 from evanlinjin/fix/deregister-tp-#125
jdknives Jan 29, 2020
0219c18
Update dmsg version
Jan 29, 2020
91a7c91
Try to fix the test
Jan 29, 2020
c592df7
Try to fix the test
Darkren Jan 29, 2020
de604ea
Merge branch 'fix/router-tests' of https://github.com/Darkren/skywire…
Darkren Jan 29, 2020
da5ff41
Fix `TestArbitrarySizeOneMessage`
Darkren Jan 29, 2020
dcf2f39
Fix `TestArbitrarySizeMultipleMessagesByChunks`
Darkren Jan 29, 2020
1d03580
Fix `TestArbitrarySizeMultipleMessagesByChunks`
Darkren Jan 29, 2020
61c8b8a
Try to fix route group test conn
Darkren Jan 29, 2020
e3ccb4f
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Jan 29, 2020
ed51af1
Merge pull request #135 from Darkren/fix/improve-route-group-logging
jdknives Jan 29, 2020
8170ef0
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Jan 29, 2020
42b9559
Fix `testPresentTimeout` subtest of `TestConn`, fix possible memory leak
Darkren Jan 29, 2020
8a46068
Add build information to binaries
nkryuchkov Jan 29, 2020
1b35030
Get build version from git describe
nkryuchkov Jan 29, 2020
d8db2d7
Print build information on start of all cmd's
nkryuchkov Jan 29, 2020
0b17b15
Show node build info in HTTP endpoint
nkryuchkov Jan 29, 2020
d030716
Fix output of build info on start
nkryuchkov Jan 29, 2020
9014c82
Remove unnecessary version output in skywire-cli
nkryuchkov Jan 29, 2020
f49ec5b
Add CLI command for visor version output
nkryuchkov Jan 29, 2020
6d8a860
Fix linter errors
nkryuchkov Jan 29, 2020
130dca7
Move buildinfo to util
nkryuchkov Jan 29, 2020
2f8c64d
Merge pull request #140 from nkryuchkov/feature/version
nkryuchkov Jan 30, 2020
9dabdb6
Add build options to missing Makefile targets
nkryuchkov Jan 30, 2020
e4236d6
Merge pull request #142 from nkryuchkov/fix/missing-makefile-targets
jdknives Jan 30, 2020
8cda7a1
Refactored dmsgpty for easier readability.
Jan 30, 2020
e656d82
rename node to visor
Kifen Jan 27, 2020
94e9571
rename nodeA to visorA
Kifen Jan 27, 2020
1f5a3cd
rename node to visor in README.md
Kifen Jan 28, 2020
080a43a
fix merge conflicts
Kifen Jan 28, 2020
4acc6e7
refactor PR based on review
Kifen Jan 30, 2020
e7b5d76
rebase
Kifen Jan 30, 2020
58787e5
Finally fix test conn?
Darkren Jan 30, 2020
46879d8
Refactor route group tests
Darkren Jan 30, 2020
d30b41d
Improve logging, refactor code a bit
Darkren Jan 30, 2020
dda1f2d
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Jan 30, 2020
6cb8d6d
Remove unused logging
Darkren Feb 2, 2020
573439c
Update dmsg version
Darkren Feb 3, 2020
e7e444e
Remove unnecessary skysocks/skysocks-client restarts, improve logging
Darkren Feb 3, 2020
0b5ac21
Improve `StopApp` logging
Darkren Feb 3, 2020
d26feb7
Merge pull request #139 from Darkren/fix/router-tests
jdknives Feb 3, 2020
bdc774e
Merge pull request #136 from Kifen/refactor/node-visor
jdknives Feb 3, 2020
36097ba
Finish renaming Node to Visor
nkryuchkov Feb 3, 2020
7643845
Merge pull request #150 from nkryuchkov/fix/finish-renaming
nkryuchkov Feb 3, 2020
9cc65d9
Make visor wait for app stop
Darkren Feb 3, 2020
2f4ec30
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Feb 3, 2020
08f8cb2
Delete skywire-peering-daemon
jdknives Feb 3, 2020
5ac87c9
Delete skywire-visor
jdknives Feb 3, 2020
7ad5549
Delete helloworld.v1.0
jdknives Feb 3, 2020
c88f02f
Delete skysocks.v1.0
jdknives Feb 3, 2020
8ebe065
Delete skysocks-client.v1.0
jdknives Feb 3, 2020
1849c63
Delete skychat.v1.0
jdknives Feb 3, 2020
cff4cda
Merge pull request #151 from SkycoinProject/jdknives-patch-1
jdknives Feb 3, 2020
7479b59
Ensure thread safety within the app proc
Darkren Feb 5, 2020
fcf09f6
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Feb 5, 2020
908c783
Update vendor
Darkren Feb 5, 2020
36e63ac
Merge pull request #149 from Darkren/fix/unconsistent-behavior-while-…
Darkren Feb 6, 2020
5a5f896
Move rule activity update to after the packet successful propagation
Darkren Feb 6, 2020
08d7c1e
Start fixing
Darkren Feb 6, 2020
7a9d8ad
Implement visor binary file update
nkryuchkov Feb 6, 2020
33ce059
Move a bit further
Darkren Feb 7, 2020
8f0bcb7
Setup goreleaser
nkryuchkov Feb 8, 2020
22eb95c
Add Makefile target for creating a GitHub release
nkryuchkov Feb 8, 2020
56b389a
Add documentation for creating a GitHub release
nkryuchkov Feb 8, 2020
afc7924
Update documentation
nkryuchkov Feb 8, 2020
2a50608
Improve parsing checksum file
nkryuchkov Feb 8, 2020
3803b9e
Rename CONTRIBUTE.md
nkryuchkov Feb 8, 2020
413ee43
Merge pull request #154 from nkryuchkov/fix/rename-contribute-file
jdknives Feb 10, 2020
1ce164c
Update vendor
Darkren Feb 10, 2020
66fc6f4
Move routing table initialization inside the router. Proxy all visor …
Darkren Feb 10, 2020
f00eeec
Move rules GC routing from routing table to router
Darkren Feb 10, 2020
eabc996
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Feb 10, 2020
4999644
Complete rules GC loop, remove old unused code, refactor a bit
Darkren Feb 10, 2020
32d2d0f
Fix non-pointer method call
Darkren Feb 10, 2020
b1577e2
Fix
Darkren Feb 10, 2020
adb3f91
Regenerate router mock
Darkren Feb 10, 2020
969f38b
Fix `router` tests, remove test for routing table clenup due to the c…
Darkren Feb 10, 2020
ef3679f
Don't check for HTTP response body before checking for an error
nkryuchkov Feb 11, 2020
788915d
Update vendor
Darkren Feb 11, 2020
8505c2e
Add debug logs
Darkren Feb 11, 2020
f7c3fdf
Fix route group closing on timeout
Darkren Feb 11, 2020
d2f438a
improve logging on app stop
Kifen Feb 11, 2020
b22fa3c
run go mod vendor
Kifen Feb 11, 2020
7184007
Merge pull request #156 from Kifen/update-logging
nkryuchkov Feb 11, 2020
5ec76f6
Include updating skywire-cli as well
nkryuchkov Feb 11, 2020
81917c3
Add skywire-cli to goreleaser
nkryuchkov Feb 11, 2020
8cfc92a
Fix log messages and comments
nkryuchkov Feb 11, 2020
b51840e
Use archives in goreleaser
nkryuchkov Feb 11, 2020
8677292
Use archives for distributing updates
nkryuchkov Feb 12, 2020
6a4a28d
Add progress bars for download operations in binaries updates
nkryuchkov Feb 12, 2020
0d8f0a3
Minor comments fixes
nkryuchkov Feb 12, 2020
14377af
Update vendor
Darkren Feb 13, 2020
2ee633f
Fix skychat conn removal, add A LOT OF debug logs
Darkren Feb 19, 2020
368bcd5
Update dmsg to latest @mainnet-milestone2.
Feb 20, 2020
2427496
Merge pull request #162 from evanlinjin/feature/m2-update-dmsg
jdknives Feb 20, 2020
3e54cf4
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Feb 20, 2020
ef49e27
Add debug logs, remove last `hashicorp/yamux` reference
Darkren Feb 20, 2020
d97be23
Disable yamux internal keep-alive for skysocks
Darkren Feb 20, 2020
7458daf
Fix packet forwarding from route group after a new route establishment
Darkren Feb 20, 2020
01257e4
Remove yamux internal keep-alive for skysocks client
Darkren Feb 20, 2020
1b82d1a
Fix keep-alive and close packets initial send
Darkren Feb 20, 2020
874bb73
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Feb 21, 2020
f896ef1
Changed to use new dmsgpty.
Feb 21, 2020
a03f7af
Vendor
Feb 21, 2020
1699469
Tidy vendor.
Feb 21, 2020
5704066
Update vendor
Darkren Feb 21, 2020
04ade12
Paused progress on hypervisor endpoints refactor.
Feb 24, 2020
8b2d488
Fix the issue when establishing the already existing route. Probably
Darkren Feb 24, 2020
7da6f5e
Update vendor
Darkren Feb 25, 2020
68c8de2
Re-implemented RPCClientDialer.
Feb 25, 2020
3644c30
Change `io.EOF` to be `io.ErrClosedPipe` when RG is closed
Darkren Feb 25, 2020
69dab69
Integrated dmsgpty into hypervisor.
Feb 25, 2020
ec482bc
Format.
Feb 25, 2020
e44d75d
Remove legacy integration folder and update vendor.
Feb 25, 2020
c63edc1
Changes to integrate dmsgpty
Feb 26, 2020
a34c572
Update vendor
Darkren Feb 27, 2020
487296b
First working implementation of dmsgpty from hypervisor.
Feb 27, 2020
18f482d
Tidy vendor.
Feb 27, 2020
0ddbd75
Implement updating apps
nkryuchkov Feb 27, 2020
bcc1830
Fix .goreleaser.yml
nkryuchkov Feb 27, 2020
f831171
Update go.sum
nkryuchkov Feb 27, 2020
39494ac
Fix bugs
nkryuchkov Feb 27, 2020
5416066
Merge branch 'milestone2' into feature/update-visor
nkryuchkov Feb 27, 2020
4bb182c
Fix intfwd rule panic
nkryuchkov Feb 27, 2020
c95d27f
Update vendor
Darkren Feb 27, 2020
b5d6519
Fix skysocks client to handle remote visor restart properly
Darkren Feb 27, 2020
7724006
Merge pull request #169 from nkryuchkov/fix/intfwd-rule-panic
Feb 28, 2020
09c5eb7
Make hypervisor getVisors concurrent.
Feb 28, 2020
299f80f
Tidy vendor.
Feb 28, 2020
bc6f38e
Made changes as requested by @nkryuchkov
Feb 28, 2020
5f16007
Update vendor
Darkren Feb 28, 2020
6ffbd07
Refactor skysocks-client to preserve `skysocks.Client`'s original int…
Darkren Feb 28, 2020
07d02ec
Remove `github.com/pkg/errors` reference
Darkren Feb 28, 2020
9bbd802
Remove unused field from route group
Darkren Feb 28, 2020
155be22
Fix bug where managedTransport may not close properly (#160).
Feb 28, 2020
049309b
Update vendor
Darkren Mar 1, 2020
c37bcea
Update vendor
Darkren Mar 2, 2020
ae700d4
Refactor debug logs
Darkren Mar 2, 2020
fc0c5ae
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Mar 2, 2020
7b48f37
Reduce keep-alive interval and route timeout
Darkren Mar 2, 2020
55446dc
Merge pull request #152 from Darkren/fix/rule-expiration
jdknives Mar 2, 2020
36fa94c
Fix conflicts.
Mar 2, 2020
bdc72de
Made hypervisor ping endpoint a separate function.
Mar 2, 2020
6d39c04
Do not allow to call (*restart.Context).Start() more than one time
nkryuchkov Mar 2, 2020
480cc39
Merge branch 'milestone2' into feature/update-visor
nkryuchkov Mar 2, 2020
c6e6c7c
Merge pull request #153 from nkryuchkov/feature/update-visor
nkryuchkov Mar 2, 2020
ebc7bb5
Update vendor
Darkren Mar 2, 2020
40b7792
Further changes to fix #160
Mar 2, 2020
6242fac
Fix accidental rule removal due to no activity update
Darkren Mar 2, 2020
c769c60
Fix merge conflicts.
Mar 2, 2020
226086d
Update vendor.
Mar 2, 2020
f92427b
Fix logging.
Mar 2, 2020
e847cae
Improved logging.
Mar 2, 2020
e3b54ff
Try to fix proper route group cloing routing on routing rule removal
Darkren Mar 2, 2020
67aa7af
Merge pull request #177 from nkryuchkov/fix/context-start
Mar 2, 2020
1830d40
Improve logging.
Mar 2, 2020
447862e
Added exponential backoff to mTp.redial and various fixes.
Mar 3, 2020
0e696f0
Format.
Mar 3, 2020
b16defe
Make travis happy.
Mar 3, 2020
c0f55df
Update vendor
Darkren Mar 3, 2020
82d45f1
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Darkren Mar 3, 2020
f39e26e
Merge pull request #179 from Darkren/fix/route-re-creation
jdknives Mar 3, 2020
bf93616
Changes as suggested by @nkryuchkov and @Darkren
Mar 3, 2020
30a16fd
Add a workaround for tests panic in Go 1.14
nkryuchkov Mar 3, 2020
a946dfe
Fix tests for Go versions older than 1.14
nkryuchkov Mar 3, 2020
120963f
Add a comment
nkryuchkov Mar 3, 2020
829d157
Fix a panic in pathutil
nkryuchkov Mar 3, 2020
b86df89
Merge pull request #187 from nkryuchkov/fix/pathutil-panic
Mar 4, 2020
b9ff295
Merge pull request #183 from nkryuchkov/fix/tests-panic-1.14
Mar 4, 2020
33ec06d
Fix merge conflicts.
Mar 4, 2020
608c380
Separate /cmd/hypervisor/commands/root.go:rootCmd() into smaller funcs.
Mar 4, 2020
047271b
Update vendor.
Mar 4, 2020
8341370
Update vendor.
Mar 4, 2020
52fe903
Merge pull request #166 from evanlinjin/feature/m3-dmsgpty-hypervisor
jdknives Mar 4, 2020
6164331
Updated error reporting when registering tp during settlement HS.
Mar 4, 2020
5315750
Tweaks.
Mar 4, 2020
992f013
Tidy vendor
Mar 4, 2020
98e4f2d
Merge pull request #188 from evanlinjin/fix/settlementHS-regTp-log
jdknives Mar 4, 2020
b959ba2
Update Makefile
jdknives Mar 4, 2020
38dab26
Update Makefile
jdknives Mar 4, 2020
75de273
Update Makefile
jdknives Mar 4, 2020
6bf1d84
Merge pull request #189 from SkycoinProject/jdknives-patch-1
jdknives Mar 4, 2020
2e7ea61
Fix SettlementHS test
nkryuchkov Mar 4, 2020
cde0e13
Split visor.Start
nkryuchkov Mar 4, 2020
a6e7905
Fix route removal bug
nkryuchkov Mar 4, 2020
e850915
Merge pull request #193 from nkryuchkov/fix/route-removal
jdknives Mar 4, 2020
5c08016
Merge pull request #191 from nkryuchkov/fix/split-method
Mar 4, 2020
761059a
Add a TODO
nkryuchkov Mar 4, 2020
4e552d7
Merge pull request #190 from nkryuchkov/fix/settlement-hs-test
jdknives Mar 4, 2020
165a07d
Add hypervisor setup section again
jdknives Mar 4, 2020
34d5eb4
Update README.md
jdknives Mar 4, 2020
a1bd9ae
Merge pull request #198 from SkycoinProject/jdknives-patch-1
jdknives Mar 4, 2020
f791660
Fix bug with atomic for 32 bit architectures
nkryuchkov Mar 4, 2020
80dd47d
Remove usage of -race flag in tests for 32 bit architectures because …
nkryuchkov Mar 4, 2020
cea0150
Fix tests timeout
nkryuchkov Mar 4, 2020
d3c11d0
Reorder statements
nkryuchkov Mar 4, 2020
302e0b4
Remove some panics
nkryuchkov Mar 4, 2020
8e03b43
Merge pull request #199 from nkryuchkov/fix/arm32-tests
jdknives Mar 4, 2020
80f373a
Make some functions panic again
nkryuchkov Mar 5, 2020
4dff2e3
Improved logging.
Mar 5, 2020
913bc09
Further improvements with logging.
Mar 5, 2020
749b11c
rename loop to routegroup
Kifen Mar 5, 2020
45fddfb
Fix SettlementHS test
nkryuchkov Mar 5, 2020
37c2045
Merge pull request #203 from nkryuchkov/fix/settlement-hs-test-2
nkryuchkov Mar 6, 2020
3793153
Fixes as suggested by @nkryuchkov
Mar 6, 2020
857d105
Merge pull request #200 from nkryuchkov/fix/remove-panics
Mar 6, 2020
fa385fa
Merge pull request #202 from evanlinjin/fix/logging-improvements
Mar 6, 2020
4cbc3f6
Added TLS options to hypervisor, and updated to use dmsg with max ses…
Mar 6, 2020
4019f78
rename functions, types and comments loops to routegroup
Kifen Mar 6, 2020
822a2d6
fix merge conflicts
Kifen Mar 6, 2020
d9c21d7
rename var rg to routegroups
Kifen Mar 6, 2020
c3d78d3
rename endpoint to routegroups
Kifen Mar 6, 2020
5aec4b7
Updated vendor.
Mar 6, 2020
86d3d2b
Merge branch 'milestone2' into fix/dmsgpty-ui-https-#206
Mar 6, 2020
90794a5
Merge pull request #208 from evanlinjin/fix/dmsgpty-ui-https-#206
jdknives Mar 6, 2020
3785b02
fix conflicts
Kifen Mar 6, 2020
ce343da
Update vendor to latest dmsg.
Mar 6, 2020
358949b
check for empty public key
Kifen Mar 6, 2020
828da60
Improve error reporting for empty public key.
Mar 6, 2020
98ae279
Merge branch 'milestone2' of github.com:SkycoinProject/skywire-mainne…
Mar 6, 2020
9a8708b
Ensure ports are freed on error when dialing.
Mar 6, 2020
e8fd8cc
fix conflicts
Kifen Mar 6, 2020
f09b147
fix conflicts
Kifen Mar 6, 2020
3078f64
rename loop to route group in router.go
Kifen Mar 6, 2020
232189a
rename loop to route group in run-pkg-tests.sh
Kifen Mar 6, 2020
22056bf
refactor error
Kifen Mar 6, 2020
6c263df
Merge pull request #211 from Kifen/fix/route-invalidPK
Mar 6, 2020
995df8b
fix merge conflicts
Kifen Mar 6, 2020
c5c22f8
Merge pull request #207 from Kifen/update/rename-loop
jdknives Mar 6, 2020
5a0d224
Fix #213
Mar 9, 2020
e0d1879
Make restart.Context reset it's internal exec.Cmd on failure.
Mar 9, 2020
7b116d0
Removed comment.
Mar 9, 2020
81b2701
Changed restart endpoint to ony accept POST, and updated restart test.
Mar 9, 2020
9823874
Remove logging of every packet contents
nkryuchkov Mar 9, 2020
c6c5224
Merge pull request #215 from nkryuchkov/fix/remove-packet-logs
jdknives Mar 9, 2020
f353823
Copy exec.Command on Start() failure
nkryuchkov Mar 9, 2020
c49c613
Merge pull request #214 from evanlinjin/fix/update-endpoint-#213
jdknives Mar 9, 2020
02906b1
Add the manager UI
Senyoret1 Mar 9, 2020
14af534
Merge pull request #216 from Senyoret1/manager3
jdknives Mar 9, 2020
0f8125b
Merge branch 'milestone2' into merge/m2-to-master
nkryuchkov Mar 9, 2020
ecc2051
Fix a failing test
nkryuchkov Mar 10, 2020
80760bb
Vendor
nkryuchkov Mar 10, 2020
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 2 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
Did you run `make format && make check`?

Fixes #

Changes:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -32,3 +32,6 @@ dmsgpty

# Ignore backup go.mod after running '/ci_scripts/go_mod_replace.sh'.
go.mod-e

# goreleaser
dist
100 changes: 100 additions & 0 deletions .goreleaser.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,100 @@
# This is an example goreleaser.yaml file with some sane defaults.
# Make sure to check the documentation at http://goreleaser.com
before:
hooks:
- go mod tidy
builds:
- id: skywire-visor
binary: skywire-visor
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/skywire-visor/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skywire-cli
binary: skywire-cli
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/skywire-cli/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skychat
binary: skychat
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/apps/skychat/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skysocks
binary: skysocks
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/apps/skysocks/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
- id: skysocks-client
binary: skysocks-client
goos:
- linux
- darwin
goarch:
- amd64
- 386
- arm64
- arm
goarm:
- 7
env:
- CGO_ENABLED=0
main: ./cmd/apps/skysocks-client/
ldflags: -s -w -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.version={{.Version}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.commit={{.ShortCommit}} -X github.com/SkycoinProject/skywire-mainnet/pkg/util/buildinfo.date={{.Date}}
archives:
- format: tar.gz
wrap_in_directory: false
name_template: 'skywire-{{ .Version }}-{{ .Os }}-{{ .Arch }}{{ if .Arm }}v{{ .Arm }}{{ end }}'
checksum:
name_template: 'checksums.txt'
snapshot:
name_template: "{{ .Tag }}-next"
changelog:
sort: asc
filters:
exclude:
- '^docs:'
- '^test:'
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
language: go
go:
# - "1.11.x" At minimum the code should run make check on the latest two go versions in the default linux environment provided by Travis.
- "1.12.x"
# - "1.13.x" At minimum the code should run make check on the latest two go versions in the default linux environment provided by Travis.
- "1.13.x"

dist: xenial

Expand All @@ -15,12 +15,12 @@ matrix:

install:
- go get -u github.com/FiloSottile/vendorcheck
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.17.1
- curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $GOPATH/bin v1.22.2

before_script:
- ci_scripts/create-ip-aliases.sh

script:
- make lint
# - make lint TODO(evanlinjin): Temporary due to https://github.com/golangci/golangci-lint/issues/827
- make test
- make test-no-ci
File renamed without changes.
126 changes: 72 additions & 54 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,48 @@
.PHONY : docker-apps docker-bin docker-volume
.PHONY : docker-run docker-stop

VERSION := $(shell git describe)

RFC_3339 := "+%Y-%m-%dT%H:%M:%SZ"
DATE := $(shell date -u $(RFC_3339))
COMMIT := $(shell git rev-list -1 HEAD)

PROJECT_BASE := github.com/SkycoinProject/skywire-mainnet
OPTS?=GO111MODULE=on
DOCKER_IMAGE?=skywire-runner # docker image to use for running skywire-visor.`golang`, `buildpack-deps:stretch-scm` is OK too
DOCKER_NETWORK?=SKYNET
DOCKER_NODE?=SKY01
DOCKER_OPTS?=GO111MODULE=on GOOS=linux # go options for compiling for docker container
TEST_OPTS?=-race -tags no_ci -cover -timeout=5m
TEST_OPTS_NOCI?=-race -cover -timeout=5m -v
BUILD_OPTS?=

TEST_OPTS_BASE:=-cover -timeout=5m

RACE_FLAG:=-race
GOARCH:=$(shell go env GOARCH)

ifneq (,$(findstring 64,$(GOARCH)))
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(RACE_FLAG)
endif

# TODO: Remove after https://github.com/etcd-io/bbolt/pull/201 is closed.
DISABLE_CHECKPTR_FLAG:=-gcflags=all=-d=checkptr=0
GO_VERSION:=$(shell go version)

ifneq (,$(findstring go1.14,$(GO_VERSION)))
TEST_OPTS_BASE:=$(TEST_OPTS_BASE) $(DISABLE_CHECKPTR_FLAG)
endif

TEST_OPTS_NOCI:=-$(TEST_OPTS_BASE) -v
TEST_OPTS:=$(TEST_OPTS_BASE) -tags no_ci

BUILDINFO_PATH := $(PROJECT_BASE)/pkg/util/buildinfo

BUILDINFO_VERSION := -X $(BUILDINFO_PATH).version=$(VERSION)
BUILDINFO_DATE := -X $(BUILDINFO_PATH).date=$(DATE)
BUILDINFO_COMMIT := -X $(BUILDINFO_PATH).commit=$(COMMIT)

BUILDINFO?=-ldflags="$(BUILDINFO_VERSION) $(BUILDINFO_DATE) $(BUILDINFO_COMMIT)"

BUILD_OPTS?=$(BUILDINFO)

check: lint test ## Run linters and tests

Expand All @@ -27,18 +61,18 @@ stop: ## Stop running skywire-visor on host
-bash -c "kill $$(ps aux |grep '[s]kywire-visor' |awk '{print $$2}')"

config: ## Generate skywire.json
-./skywire-cli node gen-config -o ./skywire.json -r
-./skywire-cli visor gen-config -o ./skywire.json -r

clean: ## Clean project: remove created binaries and apps
-rm -rf ./apps
-rm -f ./skywire-visor ./skywire-cli ./setup-node ./hypervisor

install: ## Install `skywire-visor`, `skywire-cli`, `hypervisor`, `dmsgpty`
${OPTS} go install ./cmd/skywire-visor ./cmd/skywire-cli ./cmd/setup-node ./cmd/hypervisor ./cmd/dmsgpty
install: ## Install `skywire-visor`, `skywire-cli`, `setup-node`, `hypervisor`
${OPTS} go install ${BUILD_OPTS} ./cmd/skywire-visor ./cmd/skywire-cli ./cmd/setup-node ./cmd/hypervisor

rerun: stop
${OPTS} go build -race -o ./skywire-visor ./cmd/skywire-visor
-./skywire-cli node gen-config -o ./skywire.json -r
-./skywire-cli visor gen-config -o ./skywire.json -r
perl -pi -e 's/localhost//g' ./skywire.json
./skywire-visor skywire.json

Expand All @@ -57,7 +91,6 @@ vendorcheck: ## Run vendorcheck
GO111MODULE=off vendorcheck ./cmd/skywire-cli/...
GO111MODULE=off vendorcheck ./cmd/skywire-visor/...


test: ## Run tests
-go clean -testcache &>/dev/null
${OPTS} go test ${TEST_OPTS} ./internal/...
Expand All @@ -68,46 +101,47 @@ test-no-ci: ## Run no_ci tests
${OPTS} go test ${TEST_OPTS_NOCI} ./pkg/transport/... -run "TCP|PubKeyTable"

install-linters: ## Install linters
- VERSION=1.21.0 ./ci_scripts/install-golangci-lint.sh
- VERSION=1.23.1 ./ci_scripts/install-golangci-lint.sh
# GO111MODULE=off go get -u github.com/FiloSottile/vendorcheck
# For some reason this install method is not recommended, see https://github.com/golangci/golangci-lint#install
# However, they suggest `curl ... | bash` which we should not do
# ${OPTS} go get -u github.com/golangci/golangci-lint/cmd/golangci-lint
${OPTS} go get -u golang.org/x/tools/cmd/goimports

format: ## Formats the code. Must have goimports installed (use make install-linters).
${OPTS} goimports -w -local github.com/SkycoinProject/skywire ./pkg
${OPTS} goimports -w -local github.com/SkycoinProject/skywire ./cmd
${OPTS} goimports -w -local github.com/SkycoinProject/skywire ./internal
${OPTS} goimports -w -local ${PROJECT_BASE} ./pkg
${OPTS} goimports -w -local ${PROJECT_BASE} ./cmd
${OPTS} goimports -w -local ${PROJECT_BASE} ./internal

dep: ## Sorts dependencies
${OPTS} go mod vendor -v

# Apps
host-apps: ## Build app
${OPTS} go build ${BUILD_OPTS} -o ./apps/skychat.v1.0 ./cmd/apps/skychat
${OPTS} go build ${BUILD_OPTS} -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld
${OPTS} go build ${BUILD_OPTS} -o ./apps/socksproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build ${BUILD_OPTS} -o ./apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build ${BUILD_OPTS} -o ./apps/skychat ./cmd/apps/skychat
${OPTS} go build ${BUILD_OPTS} -o ./apps/helloworld ./cmd/apps/helloworld
${OPTS} go build ${BUILD_OPTS} -o ./apps/skysocks ./cmd/apps/skysocks
${OPTS} go build ${BUILD_OPTS} -o ./apps/skysocks-client ./cmd/apps/skysocks-client

# Bin
bin: ## Build `skywire-visor`, `skywire-cli`, `hypervisor`, `dmsgpty`
bin: ## Build `skywire-visor`, `skywire-cli`, `hypervisor`
${OPTS} go build ${BUILD_OPTS} -o ./skywire-visor ./cmd/skywire-visor
${OPTS} go build ${BUILD_OPTS} -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build ${BUILD_OPTS} -o ./setup-node ./cmd/setup-node
${OPTS} go build ${BUILD_OPTS} -o ./messaging-server ./cmd/messaging-server
${OPTS} go build ${BUILD_OPTS} -o ./hypervisor ./cmd/hypervisor
${OPTS} go build ${BUILD_OPTS} -o ./dmsgpty ./cmd/dmsgpty

release: ## Build `skywire-visor`, `skywire-cli`, `hypervisor` and apps without -race flag
${OPTS} go build -o ./skywire-visor ./cmd/skywire-visor
${OPTS} go build -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build -o ./setup-node ./cmd/setup-node
${OPTS} go build -o ./hypervisor ./cmd/hypervisor
${OPTS} go build -o ./apps/skychat.v1.0 ./cmd/apps/skychat
${OPTS} go build -o ./apps/helloworld.v1.0 ./cmd/apps/helloworld
${OPTS} go build -o ./apps/socksproxy.v1.0 ./cmd/apps/therealproxy
${OPTS} go build -o ./apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
${OPTS} go build ${BUILD_OPTS} -o ./skywire-visor ./cmd/skywire-visor
${OPTS} go build ${BUILD_OPTS} -o ./skywire-cli ./cmd/skywire-cli
${OPTS} go build ${BUILD_OPTS} -o ./setup-node ./cmd/setup-node
${OPTS} go build ${BUILD_OPTS} -o ./hypervisor ./cmd/hypervisor
${OPTS} go build ${BUILD_OPTS} -o ./apps/skychat ./cmd/apps/skychat
${OPTS} go build ${BUILD_OPTS} -o ./apps/helloworld ./cmd/apps/helloworld
${OPTS} go build ${BUILD_OPTS} -o ./apps/skysocks ./cmd/apps/skysocks
${OPTS} go build ${BUILD_OPTS} -o ./apps/skysocks-client ./cmd/apps/skysocks-client

github-release: ## Create a GitHub release
goreleaser --rm-dist

# Dockerized skywire-visor
docker-image: ## Build docker image `skywire-runner`
Expand All @@ -121,21 +155,21 @@ docker-network: ## Create docker network ${DOCKER_NETWORK}
-docker network create ${DOCKER_NETWORK}

docker-apps: ## Build apps binaries for dockerized skywire-visor. `go build` with ${DOCKER_OPTS}
-${DOCKER_OPTS} go build -race -o ./node/apps/skychat.v1.0 ./cmd/apps/skychat
-${DOCKER_OPTS} go build -race -o ./node/apps/helloworld.v1.0 ./cmd/apps/helloworld
-${DOCKER_OPTS} go build -race -o ./node/apps/socksproxy.v1.0 ./cmd/apps/therealproxy
-${DOCKER_OPTS} go build -race -o ./node/apps/socksproxy-client.v1.0 ./cmd/apps/therealproxy-client
-${DOCKER_OPTS} go build -race -o ./visor/apps/skychat ./cmd/apps/skychat
-${DOCKER_OPTS} go build -race -o ./visor/apps/helloworld ./cmd/apps/helloworld
-${DOCKER_OPTS} go build -race -o ./visor/apps/skysocks ./cmd/apps/skysocks
-${DOCKER_OPTS} go build -race -o ./visor/apps/skysocks-client ./cmd/apps/skysocks-client

docker-bin: ## Build `skywire-visor`, `skywire-cli`, `hypervisor`. `go build` with ${DOCKER_OPTS}
${DOCKER_OPTS} go build -race -o ./node/skywire-visor ./cmd/skywire-visor
${DOCKER_OPTS} go build -race -o ./visor/skywire-visor ./cmd/skywire-visor

docker-volume: dep docker-apps docker-bin bin ## Prepare docker volume for dockerized skywire-visor
-${DOCKER_OPTS} go build -o ./docker/skywire-services/setup-node ./cmd/setup-node
-./skywire-cli node gen-config -o ./skywire-visor/skywire.json -r
perl -pi -e 's/localhost//g' ./node/skywire.json # To make node accessible from outside with skywire-cli
-./skywire-cli visor gen-config -o ./skywire-visor/skywire.json -r
perl -pi -e 's/localhost//g' ./visor/skywire.json # To make visor accessible from outside with skywire-cli

docker-run: docker-clean docker-image docker-network docker-volume ## Run dockerized skywire-visor ${DOCKER_NODE} in image ${DOCKER_IMAGE} with network ${DOCKER_NETWORK}
docker run -it -v $(shell pwd)/node:/sky --network=${DOCKER_NETWORK} \
docker run -it -v $(shell pwd)/visor:/sky --network=${DOCKER_NETWORK} \
--name=${DOCKER_NODE} ${DOCKER_IMAGE} bash -c "cd /sky && ./skywire-visor skywire.json"

docker-setup-node: ## Runs setup-node in detached state in ${DOCKER_NETWORK}
Expand All @@ -149,9 +183,9 @@ docker-stop: ## Stop running dockerized skywire-visor ${DOCKER_NODE}
-docker container stop ${DOCKER_NODE}

docker-rerun: docker-stop
-./skywire-cli gen-config -o ./node/skywire.json -r
perl -pi -e 's/localhost//g' ./node/skywire.json # To make node accessible from outside with skywire-cli
${DOCKER_OPTS} go build -race -o ./node/skywire-visor ./cmd/skywire-visor
-./skywire-cli gen-config -o ./visor/skywire.json -r
perl -pi -e 's/localhost//g' ./visor/skywire.json # To make visor accessible from outside with skywire-cli
${DOCKER_OPTS} go build -race -o ./visor/skywire-visor ./cmd/skywire-visor
docker container start -i ${DOCKER_NODE}

run-syslog: ## Run syslog-ng in docker. Logs are mounted under /tmp/syslog
Expand All @@ -160,22 +194,6 @@ run-syslog: ## Run syslog-ng in docker. Logs are mounted under /tmp/syslog
-docker container rm syslog-ng -f
docker run -d -p 514:514/udp -v /tmp/syslog:/var/log --name syslog-ng balabit/syslog-ng:latest


integration-startup: ## Starts up the required transports between `skywire-visor`s of interactive testing environment
./integration/startup.sh

integration-teardown: ## Tears down all saved configs and states of integration executables
./integration/tear-down.sh

integration-run-generic: ## Runs the generic interactive testing environment
./integration/run-generic-env.sh

integration-run-messaging: ## Runs the messaging interactive testing environment
./integration/run-messaging-env.sh

integration-run-proxy: ## Runs the proxy interactive testing environment
./integration/run-proxy-env.sh

mod-comm: ## Comments the 'replace' rule in go.mod
./ci_scripts/go_mod_replace.sh comment go.mod

Expand Down
Loading