Skip to content

Commit 53c4846

Browse files
committed
test self hosted runner
1 parent 7e54f56 commit 53c4846

File tree

1 file changed

+16
-190
lines changed

1 file changed

+16
-190
lines changed

.github/workflows/persubmit.yml

Lines changed: 16 additions & 190 deletions
Original file line numberDiff line numberDiff line change
@@ -4,198 +4,24 @@ on:
44
types: [opened, synchronize, reopened]
55

66
jobs:
7-
build_and_test_cpu_required:
8-
# This job will be required to pass before merging to master branch.
9-
name: Required Build and Test (CPU)
10-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') }}
11-
strategy:
12-
matrix:
13-
include:
14-
- os: ubuntu-latest
15-
python: 3.6
16-
runs-on: ${{ matrix.os }}
17-
steps:
18-
- uses: actions/checkout@v2
19-
- uses: actions/setup-python@v2
20-
with:
21-
python-version: ${{ matrix.python }}
22-
23-
- name: Download Pre-Built LLVM 10.0.0
24-
run: |
25-
python misc/ci_download.py
26-
mkdir taichi-llvm
27-
cd taichi-llvm
28-
unzip ../taichi-llvm.zip
29-
env:
30-
CI_PLATFORM: ${{ matrix.os }}
31-
32-
- name: Build
33-
run: |
34-
export TAICHI_REPO_DIR=`pwd`
35-
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
36-
export CXX=clang++
37-
python misc/ci_setup.py ci
38-
env:
39-
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=ON -DTI_BUILD_TESTS:BOOL=ON
40-
41-
- name: Test
42-
run: |
43-
export TAICHI_REPO_DIR=`pwd`
44-
export PATH=$TAICHI_REPO_DIR/bin:$PATH
45-
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
46-
export PYTHONPATH=$TAICHI_REPO_DIR/python
47-
python examples/laplace.py
48-
ti diagnose
49-
./build/taichi_cpp_tests
50-
ti test -vr2 -t2
517

52-
build_and_test_cpu:
53-
name: Build and Test (CPU)
54-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}
55-
strategy:
56-
matrix:
57-
include:
58-
- os: macos-latest
59-
python: 3.7
60-
with_cc: OFF
61-
with_cpp_tests: ON
62-
- os: ubuntu-latest
63-
python: 3.9
64-
with_cc: OFF
65-
with_cpp_tests: OFF
66-
- os: ubuntu-latest
67-
python: 3.8
68-
with_cc: ON
69-
with_cpp_tests: OFF
70-
runs-on: ${{ matrix.os }}
8+
build_and_test_gpu_windows:
9+
name: Build and Test (Windows GPU)
10+
runs-on: [self-hosted, Windows]
7111
steps:
7212
- uses: actions/checkout@v2
73-
- uses: actions/setup-python@v2
74-
with:
75-
python-version: ${{ matrix.python }}
76-
77-
- name: Download Pre-Built LLVM 10.0.0
78-
run: |
79-
python misc/ci_download.py
80-
mkdir taichi-llvm
81-
cd taichi-llvm
82-
unzip ../taichi-llvm.zip
83-
env:
84-
CI_PLATFORM: ${{ matrix.os }}
85-
8613
- name: Build
8714
run: |
88-
export TAICHI_REPO_DIR=`pwd`
89-
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
90-
export CXX=clang++
91-
python misc/ci_setup.py ci
92-
env:
93-
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=${{ matrix.with_cc }} -DTI_BUILD_TESTS:BOOL=${{ matrix.with_cpp_tests }}
94-
95-
- name: Test
96-
run: |
97-
export TAICHI_REPO_DIR=`pwd`
98-
export PATH=$TAICHI_REPO_DIR/bin:$PATH
99-
export PATH=$TAICHI_REPO_DIR/taichi-llvm/bin/:$PATH
100-
export PYTHONPATH=$TAICHI_REPO_DIR/python
101-
python examples/laplace.py
102-
ti diagnose
103-
[ "$RUN_CPP_TESTS" = "ON" ] && ./build/taichi_cpp_tests
104-
ti test -vr2 -t2
105-
env:
106-
RUN_CPP_TESTS: ${{ matrix.with_cpp_tests }}
107-
108-
build_and_test_gpu:
109-
name: Build and Test (GPU)
110-
if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip ci') && github.event.sender.login != 'taichi-gardener' }}
111-
runs-on: [zhen]
112-
steps:
113-
- uses: actions/checkout@v2
114-
115-
- name: Build
116-
run: |
117-
git --version
118-
export TAICHI_REPO_DIR=`pwd`
119-
export PATH=/home/github/taichi-llvm/bin/:$PATH
120-
export CXX=clang++-8
121-
export PYTHON=/usr/bin/python3.7
122-
$PYTHON misc/ci_setup.py ci
123-
env:
124-
CI_SETUP_CMAKE_ARGS: -DTI_WITH_OPENGL:BOOL=ON -DTI_WITH_CC:BOOL=OFF
125-
126-
- name: Test
127-
run: |
128-
export PYTHON=/usr/bin/python3.7
129-
export TAICHI_REPO_DIR=`pwd`
130-
export PATH=$TAICHI_REPO_DIR/bin:$PATH
131-
export PATH=/home/github/taichi-llvm/bin/:$PATH
132-
export PYTHONPATH=$TAICHI_REPO_DIR/python
133-
export DISPLAY=:1
134-
glewinfo
135-
$PYTHON examples/laplace.py
136-
ti diagnose
137-
ti test -vr2 -t2
138-
139-
check_previous_run:
140-
name: Checks the Workflow Run of the Previous Commit
141-
runs-on: ubuntu-latest
142-
if: ${{ contains(github.event.pull_request.labels.*.name, 'skip ci') || github.event.sender.login == 'taichi-gardener' }}
143-
steps:
144-
- uses: actions/checkout@v2
145-
- uses: actions/setup-python@v2
146-
with:
147-
python-version: 3.8
148-
- name: Check the previous run
149-
env:
150-
PR: ${{ github.event.pull_request.number }}
151-
SHA: ${{ github.event.pull_request.head.sha }}
152-
# https://docs.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token
153-
# https://docs.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets
154-
# Do not leak the secret
155-
OAUTH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
156-
run: |
157-
python misc/ci_check_previous_run.py --pr "${PR}" --sha "${SHA}" --token "${OAUTH_TOKEN}"
158-
159-
code_format:
160-
name: Code Format
161-
runs-on: ubuntu-latest
162-
# This job will be required to pass before merging to master branch.
163-
steps:
164-
- uses: actions/checkout@v2
165-
- name: Set up Python ${{ matrix.python-version }}
166-
uses: actions/setup-python@v2
167-
with:
168-
python-version: 3.8
169-
- name: Check code format
170-
run: |
171-
git fetch https://github.com/taichi-dev/taichi.git refs/heads/master
172-
git reset FETCH_HEAD
173-
git add .
174-
git config user.email "[email protected]"
175-
git config user.name "Taichi Gardener"
176-
git commit -m "fake squash commit" || true
177-
git checkout -b _last_squash
178-
git checkout -b _enforced_format
179-
git reset FETCH_HEAD
180-
python3 -m pip install --user yapf gitpython colorama
181-
python3 python/taichi/code_format.py
182-
git add .
183-
git commit -m "enforce code format" || true
184-
# exit with 1 if there were differences:
185-
git diff _last_squash _enforced_format --exit-code
186-
187-
title_format:
188-
name: Check PR Title
189-
runs-on: ubuntu-latest
190-
steps:
191-
- uses: actions/checkout@v2
192-
- uses: actions/setup-python@v2
193-
with:
194-
python-version: 3.8
195-
196-
- name: Run PR Title Checker
197-
run: |
198-
pip install semver GitPython
199-
python misc/ci_check_pr_title.py "$PR_TITLE"
200-
env:
201-
PR_TITLE: ${{ github.event.pull_request.title }}
15+
cd
16+
echo %PATH%
17+
where msbuild
18+
shell: cmd
19+
env:
20+
CI_SETUP_CMAKE_ARGS: -DTI_WITH_CUDA:BOOL=ON -DTI_WITH_OPENGL:BOOL=OFF -DTI_WITH_CC:BOOL=OFF
21+
# - name: Test
22+
# run: |
23+
# set TAICHI_REPO_DIR=C:\taichi
24+
25+
# ti diagnose
26+
# ti test -vr2 -t2
27+
# shell: cmd

0 commit comments

Comments
 (0)