Skip to content

Commit

Permalink
Improved workflow pipeline scripts for Darwin and Windows.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 10, 2024
1 parent 858c9ff commit b8ce8ca
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 18 deletions.
8 changes: 5 additions & 3 deletions .github/workflows/build_ci_darwin.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ jobs:
with:
python-version: '3.12'

- name: Get build dependencies
run: brew install make

- name: Build Zhivo
run: |
python build.py
Expand All @@ -46,3 +43,8 @@ jobs:
./dist/zhivo-darwin-x86_64 ./test/types.zhv
end=$(date +%s%3N)
echo "Elapsed time: $((end - start)) ms"
- name: Run examples (x86)
run: |
/usr/bin/time -v ./dist/zhivo-darwin-x86_64 ./examples/hello.zhv
/usr/bin/time -v ./dist/zhivo-darwin-x86_64 ./examples/99-beers.zhv
60 changes: 45 additions & 15 deletions .github/workflows/build_ci_windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,14 +13,17 @@ jobs:
- name: Checkout code
uses: actions/checkout@v2

- name: CUDA Toolkit
uses: Jimver/[email protected]
id: cuda-toolkit
with:
cuda: '12.5.0'

- name: Python 3.12 Installation
uses: actions/setup-python@v5
with:
python-version: '3.12'

- name: Get build dependencies
run: choco install make -y

- name: Build Zhivo
run: |
python build.py
Expand All @@ -30,19 +33,46 @@ jobs:
dir dist
tree dist
- name: Run test scripts (x86)
- name: Run test scripts (AMD64)
run: |
start=$((Get-Date).Millisecond)
dist\zhivo-win32-amd64.exe test\arithmetic.zhv
dist\zhivo-win32-amd64.exe test\array.zhv
dist\zhivo-win32-amd64.exe test\digits.zhv
dist\zhivo-win32-amd64.exe test\error_handling.zhv
dist\zhivo-win32-amd64.exe test\flow.zhv
dist\zhivo-win32-amd64.exe test\func.zhv
dist\zhivo-win32-amd64.exe test\loop.zhv
dist\zhivo-win32-amd64.exe test\parallel.zhv
dist\zhivo-win32-amd64.exe test\regex.zhv
dist\zhivo-win32-amd64.exe test\test.zhv
dist\zhivo-win32-amd64.exe test\types.zhv
end=$((Get-Date).Millisecond)
echo "Elapsed time: $((end - start)) ms"
- name: Run test scripts (CUDA)
run: |
start=$((Get-Date).Millisecond)
./dist/zhivo-win-x86_64.exe ./test/arithmetic.zhv
./dist/zhivo-win-x86_64.exe ./test/array.zhv
./dist/zhivo-win-x86_64.exe ./test/digits.zhv
./dist/zhivo-win-x86_64.exe ./test/error_handling.zhv
./dist/zhivo-win-x86_64.exe ./test/flow.zhv
./dist/zhivo-win-x86_64.exe ./test/func.zhv
./dist/zhivo-win-x86_64.exe ./test/loop.zhv
./dist/zhivo-win-x86_64.exe ./test/parallel.zhv
./dist/zhivo-win-x86_64.exe ./test/regex.zhv
./dist/zhivo-win-x86_64.exe ./test/test.zhv
./dist/zhivo-win-x86_64.exe ./test/types.zhv
dist\zhivo-win32-amd64-cuda.exe test\arithmetic.zhv
dist\zhivo-win32-amd64-cuda.exe test\array.zhv
dist\zhivo-win32-amd64-cuda.exe test\digits.zhv
dist\zhivo-win32-amd64-cuda.exe test\error_handling.zhv
dist\zhivo-win32-amd64-cuda.exe test\flow.zhv
dist\zhivo-win32-amd64-cuda.exe test\func.zhv
dist\zhivo-win32-amd64-cuda.exe test\loop.zhv
dist\zhivo-win32-amd64-cuda.exe test\parallel.zhv
dist\zhivo-win32-amd64-cuda.exe test\regex.zhv
dist\zhivo-win32-amd64-cuda.exe test\test.zhv
dist\zhivo-win32-amd64-cuda.exe test\types.zhv
end=$((Get-Date).Millisecond)
echo "Elapsed time: $((end - start)) ms"
- name: Run examples (AMD64)
run: |
dist\zhivo-win32-amd64.exe examples\99-beers.zhv
dist\zhivo-win32-amd64.exe examples\hello.zhv
- name: Run examples (CUDA)
run: |
dist\zhivo-win32-amd64-cuda.exe examples\99-beers.zhv
dist\zhivo-win32-amd64-cuda.exe examples\hello.zhv

0 comments on commit b8ce8ca

Please sign in to comment.