summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorruki <[email protected]>2020-05-31 13:06:03 +0800
committerruki <[email protected]>2020-05-31 13:06:03 +0800
commit36a27491b5f45ec7b190b598b470655d098ac998 (patch)
tree10321e00c42e2f847251866f073cb0af9f8bca03
parentb12160d6b800f2b42d5656257bb651a48455124c (diff)
update ci
-rw-r--r--.github/workflows/main.yml18
-rw-r--r--.travis.yml2
-rwxr-xr-xscripts/archive-all7
-rwxr-xr-xscripts/makeself/build-runfile.sh8
4 files changed, 26 insertions, 9 deletions
diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml
index f88a4c016..56800fc1d 100644
--- a/.github/workflows/main.yml
+++ b/.github/workflows/main.yml
@@ -35,11 +35,21 @@ jobs:
- uses: actions/upload-artifact@v2
if: matrix.os == 'macOS-latest'
with:
- name: xmake.gz.run
- path: scripts/makeself/xmake.gz.run
+ name: xmake-latest.gz.run
+ path: artifacts/xmake.gz.run
- uses: actions/upload-artifact@v2
if: matrix.os == 'macOS-latest'
with:
- name: xmake.xz.run
- path: scripts/makeself/xmake.xz.run
+ name: xmake-latest.xz.run
+ path: artifacts/xmake.xz.run
+ - uses: actions/upload-artifact@v2
+ if: matrix.os == 'macOS-latest'
+ with:
+ name: xmake-latest.tar.gz
+ path: artifacts/xmake.tar.gz
+ - uses: actions/upload-artifact@v2
+ if: matrix.os == 'macOS-latest'
+ with:
+ name: xmake-latest.zip
+ path: artifacts/xmake.zip
diff --git a/.travis.yml b/.travis.yml
index ffa88b418..d6a0f626d 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -34,4 +34,4 @@ script:
- travis_wait 60 xmake lua -v -D tests/run.lua
- scripts/archive-all
- scripts/makeself/build-runfile.sh
- - scripts/makeself/xmake.gz.run --info
+ - artifacts/xmake.gz.run --info
diff --git a/scripts/archive-all b/scripts/archive-all
index b888afffc..9051f37e2 100755
--- a/scripts/archive-all
+++ b/scripts/archive-all
@@ -3,6 +3,10 @@
# ./scripts/archive-all
tmpdir=/tmp/.xmake_archive
xmakeroot=`pwd`
+artifactsdir=$xmakeroot/artifacts
+if [ ! -d $artifactsdir ]; then
+ mkdir $artifactsdir
+fi
if [ -d $tmpdir ]; then
rm -rf $tmpdir
fi
@@ -27,8 +31,7 @@ cd $tmpdir/xmake || exit
rm -rf ./core/src/tbox/tbox/src/demo
# archive files
-version=`cat ./core/xmake.lua | grep -E "^set_version" | grep -oE "[0-9]*\.[0-9]*\.[0-9]*"`
-outputfile=$xmakeroot/"xmake-v$version"
+outputfile=$artifactsdir/"xmake"
if [ -f "$outputfile.zip" ]; then
rm "$outputfile.zip"
fi
diff --git a/scripts/makeself/build-runfile.sh b/scripts/makeself/build-runfile.sh
index f46d1d1bf..80ab7a18f 100755
--- a/scripts/makeself/build-runfile.sh
+++ b/scripts/makeself/build-runfile.sh
@@ -4,6 +4,10 @@
cd "$(dirname "$0")/../.."
xmakeroot=`pwd`
buildroot=$xmakeroot/scripts/makeself
+artifactsdir=$xmakeroot/artifacts
+if [ ! -d $artifactsdir ]; then
+ mkdir $artifactsdir
+fi
tmpdir=/tmp/xmake-makeself
if [ -d $tmpdir ]; then
rm -rf $tmpdir
@@ -47,7 +51,7 @@ sh ./makeself-2.4.0.run
--lsm ./lsm \
--help-header ./header \
./xmake \
- $buildroot/xmake.gz.run \
+ $artifactsdir/xmake.gz.run \
xmake-v$version-runfile \
./scripts/get.sh __local__
./makeself-2.4.0/makeself.sh \
@@ -56,6 +60,6 @@ sh ./makeself-2.4.0.run
--lsm ./lsm \
--help-header ./header \
./xmake \
- $buildroot/xmake.xz.run \
+ $artifactsdir/xmake.xz.run \
xmake-v$version-runfile \
./scripts/get.sh __local__