Skip to content
This repository was archived by the owner on Aug 1, 2023. It is now read-only.

Commit 3004b52

Browse files
committedNov 29, 2021
fix: go-libp2p-relay-daemon caching on ci
1 parent e1f111a commit 3004b52

File tree

5 files changed

+13
-5
lines changed

5 files changed

+13
-5
lines changed
 

‎.github/workflows/test.yml

+5
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ jobs:
3131
with:
3232
path: |
3333
/tmp/*-ipfs/**
34+
./go-libp2p-relay-daemon
3435
~/.npm
3536
./node_modules
3637
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
@@ -56,6 +57,7 @@ jobs:
5657
with:
5758
path: |
5859
/tmp/*-ipfs/**
60+
./go-libp2p-relay-daemon
5961
~/.npm
6062
./node_modules
6163
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
@@ -84,6 +86,7 @@ jobs:
8486
with:
8587
path: |
8688
/tmp/*-ipfs/**
89+
./go-libp2p-relay-daemon
8790
~/.npm
8891
./node_modules
8992
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
@@ -119,6 +122,7 @@ jobs:
119122
with:
120123
path: |
121124
/tmp/*-ipfs/**
125+
./go-libp2p-relay-daemon
122126
~/.npm
123127
./node_modules
124128
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}
@@ -151,6 +155,7 @@ jobs:
151155
with:
152156
path: |
153157
/tmp/*-ipfs/**
158+
./go-libp2p-relay-daemon
154159
~/.npm
155160
./node_modules
156161
key: ${{ runner.os }}-build-${{ env.CACHE_NAME }}-${{ github.event.pull_request.head.sha }}

‎scripts/custom-runtime.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ if [ ! -d /tmp/go-ipfs ]; then
2525
git clone https://github.com/ipfs/go-ipfs.git
2626
cd go-ipfs
2727
# set implementation to specific commit
28-
git checkout f13fa35a68723b5702312bed4575911f7f0f2185
28+
git checkout 8c902b156b1c35d17ce45de2525c80bf71c77b5b # https://github.com/ipfs/go-ipfs/pull/8563
2929
make build
3030
fi
3131
fi

‎scripts/setup-relayd.sh

+5-2
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,13 @@
55

66
set -eo pipefail
77

8-
if ! type relayd; then
8+
if ! test -e ./go-libp2p-relay-daemon/relayd; then
9+
echo "Building ./go-libp2p-relay-daemon/relayd binary.."
10+
rm -rf ./go-libp2p-relay-daemon
911
git clone https://github.com/libp2p/go-libp2p-relay-daemon.git
1012
cd go-libp2p-relay-daemon
1113
# no releases atm, so we pin implementation to specific commit
1214
git checkout 65211a0b6d881086feb7c386d780f55c37dff101 # 2021-11-19
13-
go install ./...
15+
go build ./...
16+
echo "./go-libp2p-relay-daemon/relayd is ready"
1417
fi

‎test/files.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const goOptions = {
2020
config: {
2121
// enabled sharding for go with automatic threshold dropped to the minimum
2222
Internal: {
23-
UnixFSShardingSizeThreshold: "1B"
23+
UnixFSShardingSizeThreshold: '1B'
2424
}
2525
}
2626
}

‎test/utils/relayd.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ export async function getRelayV (version, factory) {
1212
if (relays.has(version)) return relays.get(version)
1313
if (process.env.DEBUG) console.log(`Starting relayd_v${version}..`) // eslint-disable-line no-console
1414
if (version < 1 || version > 2) throw new Error('Unsupported circuit relay version')
15-
const relayd = command(`relayd -config scripts/relayd_v${version}.config.json -id scripts/relayd_v${version}.identity`)
15+
const relayd = command(`go-libp2p-relay-daemon/relayd -config scripts/relayd_v${version}.config.json -id scripts/relayd_v${version}.identity`)
1616
let id
1717
for await (const line of relayd.stdout) {
1818
const text = line.toString()

0 commit comments

Comments
 (0)
This repository has been archived.