Skip to content

Commit f4b4c44

Browse files
authored
Fix windows uploading binary (#2743)
* test windows bash shell * test * test polish * test clean up * test clean up * parallel test jobs * update * clean up
1 parent 5ba91d4 commit f4b4c44

1 file changed

Lines changed: 30 additions & 20 deletions

File tree

.github/workflows/main.yml

Lines changed: 30 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ on:
99
branches: [ develop ]
1010

1111
jobs:
12-
test:
12+
test-mysql:
1313
runs-on: [self-hosted, linux]
1414
env:
1515
SQLFLOW_PARSER_SERVER_PORT: 12300
@@ -26,17 +26,24 @@ jobs:
2626
- name: mysql unit test
2727
run: |
2828
set -e
29-
echo cwd ${{ github.workspace }}
3029
bash scripts/test/prepare.sh
3130
source build/env/bin/activate
3231
docker stop mysql || true
3332
docker rm mysql || true
3433
docker run --rm --name mysql -d -p 13306:3306 -v ${{ github.workspace }}:/work sqlflow:mysql
3534
SQLFLOW_TEST_DB_MYSQL_ADDR="127.0.0.1:13306" PYTHONPATH=${{ github.workspace }}/python scripts/test/mysql.sh
3635
# bash scripts/travis/upload_codecov.sh
36+
test-hive-java:
37+
runs-on: [self-hosted, linux]
38+
env:
39+
SQLFLOW_PARSER_SERVER_PORT: 12300
40+
SQLFLOW_PARSER_SERVER_LOADING_PATH: "/usr/local/sqlflow/java"
41+
steps:
42+
- uses: actions/checkout@v1
3743
- name: hive unit test
3844
run: |
3945
set -e
46+
bash scripts/test/prepare.sh
4047
source build/env/bin/activate
4148
docker pull sqlflow/gohive:dev
4249
docker stop hive || true
@@ -56,15 +63,25 @@ jobs:
5663
run: |
5764
set -e
5865
bash scripts/test/java.sh
66+
test-workflow:
67+
runs-on: [self-hosted, linux]
68+
env:
69+
SQLFLOW_PARSER_SERVER_PORT: 12300
70+
SQLFLOW_PARSER_SERVER_LOADING_PATH: "/usr/local/sqlflow/java"
71+
steps:
72+
- uses: actions/checkout@v1
73+
- name: build mysql image
74+
run: docker build -t sqlflow:mysql -f docker/mysql/Dockerfile .
5975
- name: workflow mode ci
6076
run: |
6177
set -e
78+
bash scripts/test/prepare.sh
6279
source build/env/bin/activate
6380
bash scripts/test/workflow.sh
6481
# bash scripts/travis/upload_codecov.sh
6582
push:
6683
runs-on: ubuntu-latest
67-
needs: test
84+
needs: [test-mysql, test-hive-java, test-workflow]
6885
steps:
6986
- uses: actions/checkout@v2
7087
- uses: olegtarasov/get-tag@v2
@@ -102,7 +119,7 @@ jobs:
102119
# TODO(typhoonzero): remove travis envs when we have moved to github actions completely
103120
macos-client:
104121
runs-on: macos-latest
105-
needs: test
122+
needs: [test-mysql, test-hive-java, test-workflow]
106123
steps:
107124
- uses: actions/checkout@v2
108125
- uses: olegtarasov/get-tag@v2
@@ -126,36 +143,29 @@ jobs:
126143
bash scripts/travis/deploy_client.sh
127144
windows-client:
128145
runs-on: windows-latest
129-
needs: test
146+
needs: [test-mysql, test-hive-java, test-workflow]
130147
steps:
131148
- uses: actions/checkout@v2
132149
- uses: olegtarasov/get-tag@v2
133150
id: tagName
134151
- if: ${{ github.event_name == 'schedule' }}
152+
shell: bash
135153
run: |
136154
echo "::set-env name=TRAVIS_EVENT_TYPE::cron"
137-
$REF="${{ github.ref }}"
138-
$TRAVIS_BRANCH_LIST=$REF.split("/")
139-
$TRAVIS_BRANCH=$TRAVIS_BRANCH_LIST[$TRAVIS_BRANCH_LIST.Length-1]
140-
echo "::set-env name=TRAVIS_BRANCH::$TRAVIS_BRANCH"
155+
echo "::set-env name=TRAVIS_BRANCH::${GITHUB_REF##*/}"
141156
- if: ${{ github.event_name == 'pull_request' }}
157+
shell: bash
142158
run: echo "::set-env name=TRAVIS_BRANCH::${{ github.head_ref }}"
143159
- if: ${{ github.event_name == 'push' }}
144-
run: |
145-
$REF="${{ github.ref }}"
146-
$TRAVIS_BRANCH_LIST=$REF.split("/")
147-
$TRAVIS_BRANCH=$TRAVIS_BRANCH_LIST[$TRAVIS_BRANCH_LIST.Length-1]
148-
echo "::set-env name=TRAVIS_BRANCH::$TRAVIS_BRANCH"
160+
shell: bash
161+
run: echo "::set-env name=TRAVIS_BRANCH::${GITHUB_REF##*/}"
149162
- name: relase latest windows client binary
163+
shell: bash
150164
env:
151165
TRAVIS_OS_NAME: windows
152166
QINIU_AK: ${{ secrets.QINIU_AK }}
153167
QINIU_SK: ${{ secrets.QINIU_SK }}
154168
run: |
155-
$TRAVIS_TAG="${{ steps.tagName.outputs.tag }}"
156-
$TRAVIS_PULL_REQUEST="${{ github.event.number }}"
157-
$TRAVIS_EVENT_TYPE="$Env:TRAVIS_EVENT_TYPE"
158-
$TRAVIS_BRANCH="$Env:TRAVIS_BRANCH"
159-
$QINIU_AK="$Env:QINIU_AK"
160-
$QINIU_SK="$Env:QINIU_SK"
169+
export TRAVIS_TAG="${{ steps.tagName.outputs.tag }}"
170+
export TRAVIS_PULL_REQUEST="${{ github.event.number }}"
161171
scripts/travis/deploy_client.sh

0 commit comments

Comments
 (0)