Build gpt.c #13
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Build gpt.c | |
on: | |
create: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- 'docs/**' | |
pull_request: | |
branches: | |
- main | |
paths-ignore: | |
- '**/*.md' | |
- 'docs/**' | |
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 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 |