-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.37 KB
/
build.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
name: Build gpt.c
on:
create:
workflow_dispatch:
push:
branches:
- main
pull_request:
branches:
- main
jobs:
build-cpu:
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Init submodules
run: |
git submodule update --init --recursive
- name: Install Dependencies
run: |
if [ "${{ runner.os }}" == "Linux" ]; then
sudo apt-get update && sudo apt-get install -y libomp-dev build-essential gcc gfortran make valgrind
elif [ "${{ runner.os }}" == "macOS" ]; then
brew install libomp && brew install argp-standalone && brew install valgrind && brew install gfortran
fi
- name: Install Python Dependencies
run: pip install -r requirements.txt
- name: Compile Third Party Libraries
run: |
make third_party
- name: Compile gpt.c with GCC
run: |
make clean && make
- name: Compile gpt.c with clang
run: |
make clean && make CC=clang
- name: Compile gpt.c with GCC and Debug
run: |
make clean && make CC=gcc BUILD=debug
- name: Compile gpt.c with clang and Debug
run: |
make clean && make CC=clang BUILD=debug