1+ {% raw %}name: run ci for fibjs
2+
3+ on :
4+ push :
5+ branches :
6+ - ' ci/**'
7+ - ' ci-**'
8+ - ' releases/**'
9+ - ' feat/**'
10+ - ' bugfix/**'
11+ - ' dev'
12+ - ' master'
13+ - ' test_ci'
14+ tags :
15+ - v*.*.*
16+ - test_github_actions_*
17+ pull_request :
18+ branches :
19+ - ' dev'
20+
21+ jobs :
22+ build :
23+ runs-on : ${{ matrix.os }}
24+ continue-on-error : true
25+ strategy :
26+ matrix :
27+ os : [ubuntu-16.04]
28+ version : [{% endraw %}{{ versions.join(', ') }}{% raw %}]
29+ arch : [amd64, i386]
30+ include :
31+ - os : windows-2016
32+ arch : amd64
33+ - os : macos-10.15
34+ arch : amd64
35+
36+ steps :
37+ - name : Check out Git repository
38+ uses : actions/checkout@v2
39+ with :
40+ submodules : ' recursive'
41+
42+ - name : Set Env Variables
43+ id : set-env-vars
44+ shell : bash
45+ run : |
46+ bash .github/workflows/set-env-vars.sh
47+ env :
48+ ARCH : ${{ matrix.arch }}
49+ OS : ${{ matrix.os }}
50+
51+ - name : Install FIBJS
52+ shell : bash
53+ run : |
54+ npm i;
55+ mkdir -p ./node_modules/.bin;
56+ rm -rf ./node_modules/.bin/fibjs;
57+ if [[ "$RUNNER_OS" != "Windows" ]]; then
58+ curl -SL "https://github.com/fibjs/fibjs/releases/download/v${FIBJS_VERSION}/fibjs-v${FIBJS_VERSION}-${FIBJS_OS}-${FIBJS_ARCH}.xz" -o ./node_modules/.bin/fibjs.xz;
59+ xz -d ./node_modules/.bin/fibjs.xz;
60+ chmod a+x ./node_modules/.bin/fibjs;
61+ else
62+ curl -SL "https://github.com/fibjs/fibjs/releases/download/v${FIBJS_VERSION}/fibjs-v${FIBJS_VERSION}-windows-${FIBJS_ARCH}.exe" -o ./node_modules/.bin/fibjs.exe;
63+ fi
64+ env :
65+ FIBJS_OS : ${{ steps.set-env-vars.outputs.FIBJS_OS }}
66+ FIBJS_ARCH : ${{ steps.set-env-vars.outputs.FIBJS_ARCH }}
67+ FIBJS_VERSION : ${{ matrix.version }}
68+
69+ - name : Run CI
70+ shell : bash
71+ run : |
72+ npm install;
73+ ./node_modules/.bin/lerna bootstrap;
74+ npm run ci;
75+ env :
76+ FIBJS_OS : ${{ steps.set-env-vars.outputs.FIBJS_OS }}
77+ GIT_BRANCH : ${{ steps.set-env-vars.outputs.GIT_BRANCH }}
78+ RELEASE_TAG : ${{ steps.set-env-vars.outputs.RELEASE_TAG }}
79+ GIT_TAG : ${{ steps.set-env-vars.outputs.GIT_TAG }}
80+ {% endraw %}
0 commit comments