Skip to content

Commit

Permalink
Improved build script
Browse files Browse the repository at this point in the history
  • Loading branch information
syrusakbary committed Nov 21, 2020
1 parent 812e6f2 commit 7923225
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
18 changes: 7 additions & 11 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -183,22 +183,19 @@ jobs:
run: |
make build-wapm
# if: needs.setup.outputs.DOING_RELEASE == '1'
- name: Copy target binaries for packaging
- name: Copy target binaries
run: |
mkdir -p target/release
cp target/${{matrix.target}}/release/wasmer* target/release
cp target/${{matrix.target}}/release/libwasmer* target/release
mkdir -p wapm-cli/target/release
cp wapm-cli/target/${{matrix.target}}/release/wapm* wapm-cli/target/release
if [ -d "wapm-cli" ]; then
mkdir -p wapm-cli/target/release
wapm-cli/target/${{matrix.target}}/release/wapm* wapm-cli/target/release
fi
if: matrix.target
# if: needs.setup.outputs.DOING_RELEASE == '1'
- name: Package Wasmer for integration tests
run: make package-without-wapm-for-integration-tests
if: needs.setup.outputs.DOING_RELEASE != '1'
- name: Package Wasmer
- name: Dist
run: |
make package
# if: needs.setup.outputs.DOING_RELEASE == '1'
make distribution
- name: Run integration tests (Windows)
shell: cmd
run: |
Expand Down Expand Up @@ -253,7 +250,6 @@ jobs:
path: cross
- name: Upload Artifacts
uses: actions/upload-artifact@v2
# if: needs.setup.outputs.DOING_RELEASE == '1'
with:
name: ${{ matrix.artifact_name }}
path: dist
Expand Down
17 changes: 8 additions & 9 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -268,13 +268,13 @@ test-integration:
#############

package-wapm:
ifneq ($(OS), Windows_NT)
mkdir -p "package/bin"
cp ./wapm-cli/target/release/wapm package/bin/
ifeq ($(OS), Windows_NT)
echo ""
else
echo "#!/bin/bash\nwapm execute \"\$$@\"" > package/bin/wax
chmod +x package/bin/wax
if [ -d "wapm-cli" ]; then \
cp wapm-cli/target/release/wapm package/bin/; \
echo "#!/bin/bash\nwapm execute \"\$$@\"" > package/bin/wax; \
chmod +x package/bin/wax; \
fi
endif

package-wasmer:
Expand Down Expand Up @@ -318,6 +318,8 @@ package-docs: build-docs build-docs-capi
echo '<!-- Build $(SOURCE_VERSION) --><meta http-equiv="refresh" content="0; url=wasmer_vm/index.html">' > package/docs/crates/index.html

package: package-wapm package-wasmer package-capi

distribution: package
cp LICENSE package/LICENSE
cp ATTRIBUTIONS.md package/ATTRIBUTIONS
mkdir -p dist
Expand All @@ -331,9 +333,6 @@ else
mv wasmer.tar.gz dist/
endif

# command for simulating installing Wasmer without wapm.
package-without-wapm-for-integration-tests: package-wasmer package-capi

#################
# Miscellaneous #
#################
Expand Down

0 comments on commit 7923225

Please sign in to comment.