Skip to content

Commit

Permalink
test windows schedule
Browse files Browse the repository at this point in the history
  • Loading branch information
Leonz5288 authored Aug 6, 2021
1 parent e23984d commit 644d688
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 28 deletions.
56 changes: 34 additions & 22 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,8 @@ on:
release:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/events-that-trigger-workflows#release
types: [published]
schedule:
- cron: "*/10 * * * *"

jobs:
build_and_test_mac:
Expand All @@ -13,15 +15,15 @@ jobs:
- os: macos-latest
python: 3.6
with_cc: OFF
- os: macos-latest
python: 3.7
with_cc: OFF
- os: macos-latest
python: 3.8
with_cc: OFF
- os: macos-latest
python: 3.9
with_cc: OFF
#- os: macos-latest
# python: 3.7
# with_cc: OFF
#- os: macos-latest
# python: 3.8
# with_cc: OFF
#- os: macos-latest
# python: 3.9
# with_cc: OFF
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
Expand Down Expand Up @@ -58,10 +60,15 @@ jobs:
- name: Upload PyPI
env:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow
PYPI_PWD: "sjaaeriguhbnaeikd"
PROD_PWD: "PROD"
NIGHT_PWD: "NIGHTLY"
run: |
cd python
python build.py upload
[ -z "${{ github.event.action }}" ] && export PYPI_PWD="$NIGHT_PWD"
[ -z "${{ github.event.action }}" ] && python build.py upload --testpypi --project_name taichi_nightly
[ -z "${{ github.event.action }}" ] || export PYPI_PWD="$PROD_PWD"
[ -z "${{ github.event.action }}" ] || python build.py upload
echo $PYPI_PWD
build_and_test_windows:
name: Build and Test (windows only)
Expand All @@ -71,15 +78,15 @@ jobs:
- os: windows-latest
python: 3.6
with_cc: OFF
- os: windows-latest
python: 3.7
with_cc: OFF
- os: windows-latest
python: 3.8
with_cc: OFF
- os: windows-latest
python: 3.9
with_cc: OFF
#- os: windows-latest
# python: 3.7
# with_cc: OFF
#- os: windows-latest
# python: 3.8
# with_cc: OFF
#- os: windows-latest
# python: 3.9
# with_cc: OFF
runs-on: ${{ matrix.os }}
steps:
- name: Install 7Zip PowerShell
Expand Down Expand Up @@ -129,7 +136,12 @@ jobs:
shell: powershell
env:
# https://docs.github.com/en/free-pro-team@latest/actions/reference/encrypted-secrets#using-encrypted-secrets-in-a-workflow
PYPI_PWD: "asdfasdjggaelkri"
PROD_PWD: "PROD"
NIGHT_PWD: "NIGHTLY"
run: |
cd python
python build.py upload
if ([string]::IsNullOrEmpty("${{ github.event.action }}")) {$env:PYPI_PWD = "$env:NIGHT_PWD"}
if ([string]::IsNullOrEmpty("${{ github.event.action }}")) {python build.py upload --testpypi --project_name taichi_nightly}
if ( -not [string]::IsNullOrEmpty("${{ github.event.action }}")) {$env:PYPI_PWD = "$env:PROD_PWD"}
if ( -not [string]::IsNullOrEmpty("${{ github.event.action }}")) {python build.py upload}
echo "$env:PYPI_PWD"
16 changes: 10 additions & 6 deletions .github/workflows/time.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,15 +8,19 @@ on:
jobs:
test_schedule:
name: schedule test
runs-on: macos-latest
runs-on: windows-latest
steps:
- name: test
shell: powershell
env:
PROD_PWD: "PROD"
NIGHT_PWD: "NIGHTLY"
run: |
echo "${{ github.event.action }}"
echo "Triggered every 5 minites!"
[ -z "${{ github.event.action }}" ] && export RELEASE="perform nightly release"
[ -z "${{ github.event.action }}" ] && ls
[ -z "${{ github.event.action }}" ] || export RELEASE="perform production release"
[ -z "${{ github.event.action }}" ] || pwd
echo $RELEASE
if ([string]::IsNullOrEmpty("${{ github.event.action }}")) {$env:RELEASE = "$env:NIGHT_PWD"}
if ([string]::IsNullOrEmpty("${{ github.event.action }}")) {echo "running nightly"}
if ( -not [string]::IsNullOrEmpty("${{ github.event.action }}")) {$env:RELEASE = "$env:PROD_PWD"}
if ( -not [string]::IsNullOrEmpty("${{ github.event.action }}")) {echo "running production"}
echo "$env:RELEASE"

0 comments on commit 644d688

Please sign in to comment.