Skip to content

Commit

Permalink
Build workflow pipeline for macOS.
Browse files Browse the repository at this point in the history
  • Loading branch information
nthnn committed Oct 10, 2024
1 parent 9ffca68 commit d4cafa0
Showing 1 changed file with 42 additions and 1 deletion.
43 changes: 42 additions & 1 deletion .github/workflows/build_ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ on:
- main

jobs:
build:
build-ubuntu:
runs-on: ubuntu-latest

steps:
Expand Down Expand Up @@ -79,3 +79,44 @@ jobs:
run: |
/usr/bin/time -v ./dist/zhivo-linux-x86_64-cuda ./examples/hello.zhv
/usr/bin/time -v ./dist/zhivo-linux-x86_64-cuda ./examples/99-beers.zhv
build-darwin:
runs-on: darwin-latest

steps:
- name: Checkout code
uses: actions/checkout@v2

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

- name: Get build dependencies
run: brew install make

- name: Build Zhivo
run: |
python build.py
- name: Build verification
run: |
ls dist -ral
find dist | sort | sed -e "s/[^-][^\/]*\// |/g" -e "s/|\([^ ]\)/|-\1/"
- name: Run test scripts (x86)
run: |
start=$(date +%s%3N)
./dist/zhivo-darwin-x86_64 ./test/arithmetic.zhv
./dist/zhivo-darwin-x86_64 ./test/array.zhv
./dist/zhivo-darwin-x86_64 ./test/digits.zhv
./dist/zhivo-darwin-x86_64 ./test/error_handling.zhv
./dist/zhivo-darwin-x86_64 ./test/flow.zhv
./dist/zhivo-darwin-x86_64 ./test/func.zhv
./dist/zhivo-darwin-x86_64 ./test/loop.zhv
./dist/zhivo-darwin-x86_64 ./test/parallel.zhv
./dist/zhivo-darwin-x86_64 ./test/regex.zhv
./dist/zhivo-darwin-x86_64 ./test/test.zhv
./dist/zhivo-darwin-x86_64 ./test/types.zhv
end=$(date +%s%3N)
echo "Elapsed time: $((end - start)) ms"

0 comments on commit d4cafa0

Please sign in to comment.