From 6dc778389ffb94d509eebc77a0badb8672bc5d5a Mon Sep 17 00:00:00 2001 From: treeform Date: Sun, 17 Nov 2019 09:33:39 -0800 Subject: [PATCH] Add a CI (#1) --- .github/workflows/build.yml | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..38dcb2c --- /dev/null +++ b/.github/workflows/build.yml @@ -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 +