Add a CI (#1)
This commit is contained in:
parent
c66c1ee9b3
commit
6dc778389f
37
.github/workflows/build.yml
vendored
Normal file
37
.github/workflows/build.yml
vendored
Normal 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
|
||||
|
Loading…
Reference in a new issue