Commit Graph

146 Commits

Author SHA1 Message Date
rishflab
13764161a3 Add create release archive action for windows
Windows users may not have a tar extractor installed by default so 7z
was used to create a zip archive. I attempted to add the action names to
 the strategy matrix so we dont need if statements to choose the
 appropriate create release archive action but github did not like when
 I passed a field under strategy.matrix.include into steps.uses.
2021-03-04 12:29:33 +11:00
rishflab
d88a235883 Use gtar to create release archive
tar was producing an archived that binary that was failing to execute on
 developer machines. Since gtar is not available on windows or ubuntu,
 the windows and ubuntu releases was removed.
2021-03-04 09:00:24 +11:00
bors[bot]
3f12c6f58a
Merge #256
256: Give GitHub some time to process the deletion of the release  r=thomaseizinger a=thomaseizinger



Co-authored-by: Thomas Eizinger <thomas@eizinger.io>
2021-03-02 05:05:55 +00:00
Thomas Eizinger
75cec57e9d
Give GitHub some time to process the deletion of the release
If we immediately chain the two actions, `create-release` only creates
a draft for some reason.
2021-03-02 15:47:20 +11:00
rishflab
e9b56934e8 Add windows to release and build workflow 2021-03-02 15:09:12 +11:00
Thomas Eizinger
73bbec1bc0
Create a 'latest' release on pushes to master
Fixes #241.
2021-03-02 11:28:00 +11:00
Thomas Eizinger
d0ee873a92
Smoke test the binary in the release workflow
Fixes #251.
2021-03-02 11:15:37 +11:00
Daniel Karzel
06be66700e Remove windows from the release
At the moment windows fails to build. This has to be fixed before it is re-added to the release.
2021-02-26 18:11:18 +11:00
rishflab
9a4c5df368 Create github workflow to build swap_cli binary on release 2021-02-23 16:50:11 +11:00
Daniel Karzel
fe3d6f1fef Rename nectar to asb (automated swap backend) 2021-02-22 10:24:11 +11:00
Thomas Eizinger
fb45ff66eb
Update rust-toolchain to new toml syntax
This allows us to completely skip the "Install Rust" step in CI
because the rust-toolchain file completely describes what we need.
The first invocation of cargo will simply install all the required
components.

Additionally, we make all caches dependant on the version of Rust
that we require.
2021-02-18 13:16:05 +11:00
Thomas Eizinger
8072f4d7ee
Only install tomlfmt if we don't have ~/.cargo/bin cached 2021-02-18 13:15:30 +11:00
Thomas Eizinger
a3b5c13b52
Upgrade to actions/cache@v2.1.4
Usually, we can follow the rolling major tag (@v2) of actions.
However the recent release (2.1.4) is not yet included. See
https://github.com/actions/cache/issues/528 for more details.

We do want to depend on 2.1.4 because it contains a fix that allows
us to use the cache action MacOS. v2 also features better compression
and allows for multiple paths to be specified.
2021-02-17 14:50:44 +11:00
Thomas Eizinger
f1b097877b
Split build_test into build and test
Building binaries and building tests results in different artifacts
inside the `target` directory. If we use distinct caches for these
commands, the caches are more useful because less code has to be
re-built.
2021-02-17 14:46:12 +11:00
Thomas Eizinger
e57c005920
Remove unused matrix entry 2021-02-17 14:43:53 +11:00
Thomas Eizinger
acbc0f5551
Upload nectar binary in addition to swap_cli 2021-02-17 14:42:15 +11:00
Thomas Eizinger
3c7880f771
Fix path to CLI for artifact upload
The name was recently changed but the workflow wasn't adapted.
2021-02-17 14:40:34 +11:00
Daniel Karzel
e353d0e89b Remove tor installation from CI 2021-02-15 10:11:41 +11:00
Franck Royer
eb39add5ff
Fix typo 2021-02-10 16:42:55 +11:00
Franck Royer
15eb9a2fe4
Remove punish test
The punish test needs re-work due to the fact that Alice runs continuously

Currently focusing on the CLI (Bob), so we can re-introduce this test
once we want to ensure that nectar (Alice) punishes.
2021-02-10 16:42:55 +11:00
Franck Royer
3bc8b58b6a
Remove Bob restart tests after communication
The test do not work without acks as we stop the event loop as soon
as a message is considered as "sent" when actually the event loop
and swarm may not have yet sent the message.

The ack allow to avoid this issue as the message was considered "sent"
only once the other party sent a response. However, the ack brings
other issue so a review needs to be done to select the appropriate
solution.
2021-02-10 16:42:55 +11:00
Franck Royer
fd9f633a77
Remove Alice restarts tests
Current focus is on CLI UX. Fair amount of change needs to happen to
cater for Alice (nectar) restart scenarios.
2021-02-10 16:42:55 +11:00
Daniel Karzel
c930ad84a4 Add --force flag for cancel and refund 2021-02-08 21:19:38 +11:00
Daniel Karzel
02f8eb7f18 Add test for cancel/refund before timelock expired 2021-02-08 21:18:37 +11:00
Daniel Karzel
c9adbde5d5 Add test for Bob's manual cancel and refund 2021-02-08 21:17:56 +11:00
Franck Royer
09e0d3b877
Run docker tests in separate GitHub tasks 2021-01-29 13:29:24 +11:00
Franck Royer
5c2f83fd5d
Remove nightly chain 2021-01-29 11:36:13 +11:00
rishflab
0b69573129
Run tests on one thread, increase T1 2021-01-29 11:36:13 +11:00
rishflab
c900d12593 Merge xmr_btc crate
Created network, storage and protocol modules. Organised
files into the modules where the belong.

xmr_btc crate moved into isolated modulein swap crate.

Remove the xmr_btc module and integrate into swap crate.

Consolidate message related code

Reorganise imports

Remove unused parent Message enum

Remove unused parent State enum

Remove unused dependencies from Cargo.toml
2021-01-08 12:34:33 +11:00
Franck Royer
058c214892
Only run 2 tests at the same time to avoid resource issue with docker 2020-12-23 09:17:59 +11:00
Franck Royer
9af8ab3028
Increase stack size to 16MB
Default is 8MB. As we start both Alice and bob in test, it is fine to
double the stack size but still assume it does not impact the
normal execution of the binary.
2020-12-21 08:13:42 +11:00
Franck Royer
2541fad40f
Report times in CI 2020-12-09 17:33:24 +11:00
rishflab
b4ac69fa9c Reduce stack size to prevent CI resource issues 2020-12-07 09:44:26 +11:00
rishflab
c91e9652aa Add alice punish test
Use reusable test init functions for happy path test

Extract tracing setup to reusable function

Move test initialization to seperate functions

Increase stack size in CI

Fix monero max finality time

Force Bob swarm polling to send message 2

Run Bob state to xmr_locked in punish test to force the sending of
message2. Previously Bob state was run until btc_locked. Although
this was the right thing to do, message2 was not being sent as the
swarm was not polled in btc_locked. Alice punish test passes.

Add info logging to executor
2020-12-04 17:23:37 +11:00
Franck Royer
9ebacd8ccb
Attach binaries when doing CI run
To make it easier to deploy the binary on a less powerful machine when
doing mainnet try outs.

Also add CI for mac os.
2020-11-10 20:24:58 +11:00
Lucas Soriano del Pino
4790d701e5 Update cross-curve-dleq dependency
Making build times considerably faster.

On my machine, after running `cargo clean`, `cargo build -p swap`
takes 2min 19s.

The updated dependency also comes with a critical fix to the `Scalar`
type, which originally wrongly assumed that secp256k1 and ed25519
scalars had the same endianness. For this reason, we now have to
reverse the bytes of recovered scalars if we are to use them on a
different chain.

Finally, there is no need to append `RUST_MIN_STACK=100000000` to
avoid stack overflows in tests and when running the binary.
2020-11-09 13:14:09 +11:00
rishflab
606c48c752 Format swap crate Cargo.toml 2020-11-03 15:13:03 +11:00
Philipp Hoenisch
b8fd9a734f
Use full path imports for dependencies to reduce cfg hell 2020-10-28 11:18:14 +11:00
Philipp Hoenisch
7f3aa644a0
Extre CI flag to run clippy for wihtout all features enabled 2020-10-27 16:02:32 +11:00
Philipp Hoenisch
ae1ea08bb2
Make it work on CI 2020-10-22 08:03:06 +11:00
Philipp Hoenisch
295216a8ee
Add Tor feature flag and only run test if enabled 2020-10-21 18:18:25 +11:00
Lucas Soriano del Pino
e5ddec76f7 Increase Rust minimum stack size in CI 2020-10-21 16:09:24 +11:00
Tobin C. Harding
e17575304b Add 60 sleep to workflow
There is some sort of timing issue when spinning up the monero containers on
github CI. I do not know exactly what is the cause but we have a configurable
'additional sleep time' already available for `testcontainers` that can resolve
this issue.

Use the environment variable MONERO_ADDITIONAL_SLEEP_PERIOD to tell
`testcontainers` to wait an additional 60 while bringing up the monero
container.
2020-10-09 11:16:15 +11:00
Tobin C. Harding
2064bfed5b Revert "Merge pull request #5 from comit-network/fix-ci"
This reverts commit 3b0b722d46, reversing
changes made to 93f1d960f5.
2020-10-09 09:57:28 +11:00
rishflab
e8ffed6979 Run CI tests on one thread
This is quick and dirty fix to resolve xmr-btc-swap and
monero-harness tests failing in CI when run concurrently.
2020-10-08 15:37:39 +11:00
Lucas Soriano del Pino
1f99cf001c Swap Monero for Bitcoin
Co-authored-by: rishflab <rishflab@hotmail.com>
Co-authored-by: Philipp Hoenisch <philipp@hoenisch.at>
Co-authored-by: Tobin C. Harding <tobin@coblox.tech>
2020-09-28 17:15:57 +10:00