forked from TA-Lib/ta-lib
-
Notifications
You must be signed in to change notification settings - Fork 0
89 lines (75 loc) · 2.49 KB
/
main-nightly-tests.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# Periodic tests of latest main branch
#
name: main nightly tests
# Controls when the workflow will run
on:
schedule:
- cron: "0 7 * * *" # every day 7AM
workflow_dispatch:
jobs:
test:
name: Test ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, windows-2022]
steps:
- name: Checkout main Branch
uses: actions/checkout@v4
with:
ref: main
- name: Install build tools (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
sudo apt update && sudo apt install -y automake libtool autogen mcpp openjdk-21-jdk
- name: Install Rust Toolchain (Linux)
if: runner.os == 'Linux'
uses: dtolnay/rust-toolchain@stable
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: "3.x"
- name: Create shell envs (Linux)
if: runner.os == 'Linux'
shell: bash
run: |
echo "PYTHON=python3" >> $GITHUB_ENV
- name: Create shell envs (Windows)
if: runner.os == 'Windows'
shell: cmd
run: |
call "C:\Program Files (x86)\Microsoft Visual Studio\Installer\vswhere.exe" -latest -products * -requires Microsoft.Component.MSBuild -find MSBuild\**\Bin\MSBuild.exe > msbuild_path.txt
set /p MSBUILD_PATH=<msbuild_path.txt
set VCVARSALL=%MSBUILD_PATH%\..\..\..\..\VC\Auxiliary\Build\vcvarsall.bat
echo VCVARSALL=%VCVARSALL% >> %GITHUB_ENV%
echo PYTHON=python >> %GITHUB_ENV%
- name: Build dist assets (Linux)
if: runner.os == 'Linux'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
$PYTHON $GITHUB_WORKSPACE/scripts/package.py
- name: Build dist assets (Windows x64)
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: cmd
run: |
call "%VCVARSALL%" x64
%PYTHON% %GITHUB_WORKSPACE%\scripts\package.py
- name: Test dist assets (Linux)
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: bash
run: |
$PYTHON $GITHUB_WORKSPACE/scripts/test-dist.py
- name: Test dist assets (Windows x64)
if: runner.os == 'Windows'
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
shell: cmd
run: |
call "%VCVARSALL%" x64
%PYTHON% %GITHUB_WORKSPACE%\scripts\test-dist.py