aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMikkel Hjortshøj <fyoucon@gmail.com>2019-10-21 19:46:05 +0200
committerMikkel Hjortshoej <fyoucon@gmail.com>2019-10-21 23:00:24 +0200
commitc0e8113f6f031a3e80efbb4f556f2831b1350905 (patch)
treee600f3f03c10af82de39354dc7882016512c8b7f
parente15dfa8eb6c64b9c39fbd8ea0712e31082137d63 (diff)
Add github CI action
-rw-r--r--.github/workflows/ci.yml54
1 files changed, 54 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 000000000..50ca88d95
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,54 @@
+name: CI
+on: [push, pull_request]
+
+jobs:
+ build_unix:
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest, macOS-latest]
+
+ steps:
+ - uses: actions/checkout@v1
+ - name: (macOS) Download LLVM and setup PATH
+ if: startsWith(matrix.os, 'macOS')
+ run: |
+ brew install llvm
+ echo ::add-path::/usr/local/opt/llvm/bin
+ echo ::set-env name=CPATH::`xcrun --show-sdk-path`/usr/include
+ - name: (Linux) Download LLVM
+ if: startsWith(matrix.os, 'ubuntu')
+ run: |
+ sudo apt-get install llvm
+ - name: build odin
+ run: make release
+ - name: Odin run
+ run: ./odin run examples/demo/demo.odin
+ - name: Odin check
+ run: ./odin check examples/demo/demo.odin -vet
+ build_windows:
+ runs-on: windows-latest
+ steps:
+ - uses: actions/checkout@v1
+ - name: Install cURL
+ run: choco install curl
+ - name: Download and unpack LLVM bins
+ run: |
+ cd bin
+ curl -sL https://github.com/odin-lang/Odin/releases/download/llvm-windows/llvm-binaries.zip --output llvm-binaries.zip
+ ls
+ 7z x llvm-binaries.zip > nul
+ - name: build Odin
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ ./build_ci.bat
+ - name: Odin run
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ odin run examples/demo/demo.odin
+ - name: Odin check
+ run: |
+ call "C:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\VC\Auxiliary\Build\vcvars64.bat
+ odin check examples/demo/demo.odin -vet
+
+