Add a CI (#1)

This commit is contained in:
treeform 2019-11-17 09:33:39 -08:00 committed by GitHub
parent c66c1ee9b3
commit 6dc778389f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

37
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,37 @@
name: Build
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Cache choosenim
id: cache-choosenim
uses: actions/cache@v1
with:
path: ~/.choosenim
key: ${{ runner.os }}-choosenim-1.0.2
- name: Cache nimble
id: cache-nimble
uses: actions/cache@v1
with:
path: ~/.nimble
key: ${{ runner.os }}-nimble-1.0.2
- name: Install Nim
if: steps.cache-choosenim.outputs.cache-hit != 'true' || steps.cache-nimble.outputs.cache-hit != 'true'
run: |
export CHOOSENIM_CHOOSE_VERSION="1.0.2"
curl https://nim-lang.org/choosenim/init.sh -sSf > init.sh
sh init.sh -y
- name: Build project
run: |
export PATH=$HOME/.nimble/bin:$PATH
echo $PATH
nimble install -y
nim c src/vmath.nim