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

chore: use common ipfs/*-actions in sync-release-assets #8609

Merged
merged 1 commit into from
Dec 15, 2021
Merged
Changes from all commits
Commits
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
34 changes: 3 additions & 31 deletions .github/workflows/sync-release-assets.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,38 +13,10 @@ jobs:
sync-github-and-dist-ipfs-io:
runs-on: "ubuntu-latest"
steps:
- name: Setup go
uses: actions/setup-go@v2
- uses: ipfs/download-ipfs-distribution-action@v1
- uses: ipfs/start-ipfs-daemon-action@v1
with:
go-version: '1.16'
- uses: actions/cache@v2
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-go-
- name: Build go-ipfs binary
run: go install github.com/ipfs/go-ipfs/cmd/ipfs@latest
- name: Initialize go-ipfs and start daemon
run: |
sudo sysctl -w net.core.rmem_max=2500000
ipfs init --profile flatfs,server
ipfs daemon --enable-gc=false &
while (! ipfs id --api "/ip4/127.0.0.1/tcp/5001"); do sleep 1; done
- name: Wait for go-ipfs to be ready
Copy link
Member

@lidel lidel Dec 15, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@galargh Can we update ipfs/start-ipfs-daemon-action to include a version of this additional check?
iiuc we want to ensure the ipfs id | jq .Addresses list is not empty before continuing. I believe we had CI randomly fail due to race condition sometimes because libp2p transports did not finish startup

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shell: pwsh
run: |
for ($i = 0; $i -lt 10; $i++) {
$addrs = ipfs id | jq .Addresses;
if ($addrs -eq "null") {
sleep 1
} else {
echo "Successfully started the daemon"
exit 0
}
}
args: --init --init-profile=flatfs,server --enable-gc=false
- uses: actions/setup-node@v2
with:
node-version: 14
Expand Down