Skip to content

Commit 14da641

Browse files
committed
.github/workflows/cargo-build.yml
1 parent b8ffd5c commit 14da641

File tree

4 files changed

+39
-10
lines changed

4 files changed

+39
-10
lines changed

.github/workflows/cargo-build.yml

Lines changed: 30 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,13 +61,39 @@ jobs:
6161
#make autoconf automake \
6262
#libtool gettext util-linux bash cmake clang
6363
64-
- name: cargo-br-tokio
64+
## cargo-b cargo-build-release-tokio cargo-report
65+
## cargo-b-release cargo-build-tokio cargo-t-jit-as
66+
## cargo-b-wasm-async-std cargo-c cargo-t-jit-tokio
67+
## cargo-b-wasm-tokio cargo-check cargo-test-async-std
68+
## cargo-bas cargo-check-async-std cargo-test-benches
69+
## cargo-bench cargo-check-tokio cargo-test-js-interop-async-std
70+
## cargo-br-async-std cargo-doc cargo-test-js-interop-tokio
71+
## cargo-br-tokio cargo-help cargo-test-tokio
72+
## cargo-bt cargo-i cargo-ts
73+
## cargo-build-async-std cargo-install cargo-tt
74+
## cargo-build-release-async-std cargo-jits
75+
76+
- name: cargo-c
77+
run: |
78+
make cargo-c
79+
80+
- name: cargo-b
81+
run: |
82+
make cargo-b
83+
84+
- name: cargo-b-release
6585
run: |
66-
make cargo-br-tokio
86+
make cargo-b-release
6787
68-
- name: cargo-br-async-std
88+
- name: cargo-build-release-tokio
6989
run: |
70-
make cargo-br-async-std
90+
make cargo-build-release-tokio
91+
92+
- name: cargo-build-release-async-std
93+
run: |
94+
make cargo-build-release-async-std
95+
96+
7197
7298
- name: Run tests
7399
run: source "$HOME/.cargo/env" && cargo test --verbose

examples-nodejs/replicate.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ hypercore.info().then((_info) => {
1212
console.log('KEY=' + hypercore.key.toString('hex'))
1313
console.log()
1414
if (hypercore.writable && !key) {
15-
hypercore.append(['hi\n', 'ola\n', 'hello\n', 'mundo\n'])
15+
hypercore.append(['hi\n', 'ola\n', 'hello\n', 'mundo\n', hypercore.key.toString('hex')])
1616
}
1717
})
1818

@@ -58,7 +58,7 @@ function onconnection (opts) {
5858
console.log("");
5959
console.log("### Results (Press Ctrl-C to exit)");
6060
console.log("");
61-
console.log("Replication succeeded if you see '0: hi', '1: ola', '2: hello' and '3: mundo' (not necessarily in that order)")
61+
console.log("Replication succeeded if you see '0: hi', '1: ola', '2: hello', '3: mundo', '4: key', (not necessarily in that order)")
6262
console.log("");
6363
for (let i = 0; i < hypercore.length; i++) {
6464
hypercore.get(i).then(value => {

examples-nodejs/run.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ const p = require('path')
33
const chalk = require('chalk')
44
const split = require('split2')
55

6-
const PORT = 8000
7-
86
const EXAMPLE_NODE = p.join(__dirname, 'replicate.js')
97
const EXAMPLE_RUST = 'replication'
108
const MODE = process.argv[2]
9+
const PORT = process.argv[3] || 8000
10+
1111
if (!MODE) {
1212
usage()
1313
}

examples/replication.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,11 @@ fn main() {
3838
});
3939

4040
task::block_on(async move {
41+
4142
let mut hypercore_store: HypercoreStore<RandomAccessMemory> = HypercoreStore::new();
43+
4244
let storage = Storage::new_memory().await.unwrap();
45+
4346
// Create a hypercore.
4447
let hypercore = if let Some(key) = key {
4548
let public_key = VerifyingKey::from_bytes(&key).unwrap();
@@ -53,7 +56,7 @@ fn main() {
5356
.unwrap()
5457
} else {
5558
let mut hypercore = HypercoreBuilder::new(storage).build().await.unwrap();
56-
let batch: &[&[u8]] = &[b"hi\n", b"ola\n", b"hello\n", b"mundo\n"];
59+
let batch: &[&[u8]] = &[b"hi\n", b"ola\n", b"hello\n", b"mundo\n", b"key\n"];
5760
hypercore.append_batch(batch).await.unwrap();
5861
hypercore
5962
};
@@ -388,7 +391,7 @@ where
388391
println!();
389392
println!("### Results");
390393
println!();
391-
println!("Replication succeeded if this prints '0: hi', '1: ola', '2: hello' and '3: mundo':");
394+
println!("Replication succeeded if this prints '0: hi', '1: ola', '2: hello', '3: mundo', '4: key':");
392395
println!();
393396
for i in 0..new_info.contiguous_length {
394397
println!(

0 commit comments

Comments
 (0)