Skip to content

Commit

Permalink
build, refactor: test error in ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
xicilion committed Oct 27, 2023
1 parent 0a14ade commit d1d3c10
Show file tree
Hide file tree
Showing 2 changed files with 23 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -175,4 +175,4 @@ jobs:

- name: Test
shell: bash
run: . ./bin/${HOST_OS}_${BUILD_ARCH}_${BUILD_TYPE}/jssdk_test
run: . ./vender/.github/workflows/test.sh
22 changes: 22 additions & 0 deletions .github/workflows/test.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#!/bin/bash

set -ev

DIST_EXEC="bin/${HOST_OS}_${BUILD_ARCH}_${BUILD_TYPE}/jssdk_test"
if [[ $HOST_OS == 'Linux' ]]; then
CUR=`pwd`

if [[ "$BUILD_TARGET" != "" ]]; then
docker run -t --rm -v ${CUR}:${CUR} fibjs/${BUILD_TARGET}-test-env:${TARGET_ARCH} bash -c "cd ${CUR}; $DIST_EXEC"
else
if [[ $TARGET_ARCH == 'x64' ]]; then
docker run -t --rm -v ${CUR}:${CUR} ubuntu:12.04 bash -c "cd ${CUR}; $DIST_EXEC"
else
docker run -t --rm -v ${CUR}:${CUR} fibjs/linux-build-env:${TARGET_ARCH} bash -c "cd ${CUR}; $DIST_EXEC"
fi
fi
else # Windows/Darwin
$DIST_EXEC
fi

exit 0;

0 comments on commit d1d3c10

Please sign in to comment.