Skip to content

Commit e1f1d5a

Browse files
authored
Fix build asset publishing (filecoin-project#195)
1 parent 29fce72 commit e1f1d5a

File tree

5 files changed

+16
-4
lines changed

5 files changed

+16
-4
lines changed

.github/workflows/ci.yml

+4-2
Original file line numberDiff line numberDiff line change
@@ -73,10 +73,12 @@ jobs:
7373
with:
7474
command: ${{ matrix.command }}
7575
args: ${{ matrix.args }}
76+
- name: making bundle
77+
if: ${{ matrix.command == 'build' }}
78+
run: ./build-bundle.sh
7679
- name: Publishing build artifacts
7780
if: ${{ matrix.command == 'build' }}
7881
uses: actions/upload-artifact@v2
7982
with:
8083
name: bundle
81-
path: |
82-
target/**/bundle.car
84+
path: output/builtin-actors.car

.gitignore

+2-1
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,5 @@ target
22
*.wat
33
*.wasm
44
.idea/
5-
**/.DS_Store
5+
**/.DS_Store
6+
output/builtin-actors.car

Makefile

+4-1
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ publish:
5050
echo "$(ORDERED_PACKAGES)" | xargs -n1 cargo publish -p "$$pkg"
5151
done
5252

53+
# Create a bundle in a deterministic location
54+
bundle: deps-build
55+
./build-bundle.sh
5356

5457
# Check if the working tree is clean.
5558
check-clean:
@@ -69,4 +72,4 @@ deps-release:
6972
exit 1; \
7073
}
7174

72-
.PHONY: check check-clean deps deps-release deps-release test publish bump-version set-version
75+
.PHONY: check check-clean deps deps-release deps-release test publish bump-version set-version bundle

build-bundle.sh

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
#!/bin/bash
2+
3+
set -e
4+
5+
bundle=$(cargo build 2>&1 | grep "warning: bundle=" | cut -d = -f 2)
6+
cp -v $bundle output/builtin-actors.car

output/.keep

Whitespace-only changes.

0 commit comments

Comments
 (0)