commit fa287f71f8144a1e0c48ffdcd328bbde81d4704d
parent caf5195171edfffebab7e3cf3ba0d62421f28e11
Author: Danil Kolumbet <kolumbetko@gmail.com>
Date: Fri, 2 Jul 2021 00:05:23 +0300
Try to setup the CI
Diffstat:
3 files changed, 70 insertions(+), 2 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
@@ -0,0 +1,56 @@
+name: CI
+on: [push, pull_request]
+
+jobs:
+ build-linux-gcc:
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v1
+ - name: install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -qq libsdl2-dev
+ - name: build te
+ run: |
+ make
+ env:
+ CC: gcc
+ build-linux-clang:
+ runs-on: ubuntu-18.04
+ steps:
+ - uses: actions/checkout@v1
+ - name: install dependencies
+ run: |
+ sudo apt-get update
+ sudo apt-get install -qq libsdl2-dev
+ - name: build te
+ run: |
+ make
+ env:
+ CC: clang
+ build-macos:
+ runs-on: macOS-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: install dependencies
+ run: brew install sdl2 pkg-config
+ - name: build te
+ run: |
+ make
+ env:
+ CC: clang
+ build-windows-msvc:
+ runs-on: windows-2019
+ steps:
+ - uses: actions/checkout@v1
+ # this runs vcvarsall for us, so we get the MSVC toolchain in PATH.
+ - uses: seanmiddleditch/gha-setup-vsdevenv@master
+ - name: download sdl2
+ run: |
+ curl -fsSL -o SDL2-devel-2.0.14-VC.zip https://www.libsdl.org/release/SDL2-devel-2.0.14-VC.zip
+ tar -xf SDL2-devel-2.0.14-VC.zip
+ mv SDL2-2.0.14 SDL2
+ - name: build te
+ shell: cmd
+ run: |
+ ./build_msvc.bat
diff --git a/.gitignore b/.gitignore
@@ -1 +1,6 @@
-te
-\ No newline at end of file
+te
+SDL2
+*.exe
+*.obj
+*.pdb
+*.ilk
diff --git a/build_msvc.bat b/build_msvc.bat
@@ -0,0 +1,8 @@
+@echo off
+rem launch this from msvc-enabled console
+
+set CFLAGS=/W4 /WX /std:c11 /FC /TC /Zi /nologo
+set INCLUDES=/I SDL2\include
+set LIBS=SDL2\lib\x64\SDL2.lib SDL2\lib\x64\SDL2main.lib Shell32.lib
+
+cl.exe %CFLAGS% %INCLUDES% /Fete main.c la.c /link %LIBS% -SUBSYSTEM:windows