Skip to content
This repository was archived by the owner on Aug 14, 2023. It is now read-only.

Commit 6f08c7d

Browse files
JorropoYaronWittenstein
authored andcommitted
Changing to github actions (#35)
* Change to Github Action. * Adding cache.
1 parent d4e7713 commit 6f08c7d

File tree

3 files changed

+85
-140
lines changed

3 files changed

+85
-140
lines changed

.github/workflows/rust.yml

Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
- develop
8+
pull_request:
9+
branches:
10+
- master
11+
- develop
12+
13+
jobs:
14+
Lint:
15+
runs-on: ubuntu-latest
16+
strategy:
17+
fail-fast: False
18+
steps:
19+
- name: Download commit
20+
uses: actions/checkout@v1
21+
with:
22+
fetch-depth: 1
23+
- name: Cache cargo
24+
id: cache-cargo
25+
uses: actions/cache@v1
26+
with:
27+
path: ~/.cargo/
28+
key: ${{ runner.os }}-lint-cargo
29+
- name: Install latest nightly
30+
uses: actions-rs/toolchain@v1
31+
with:
32+
toolchain: nightly
33+
- name: Lint
34+
uses: actions-rs/cargo@v1
35+
with:
36+
toolchain: nightly
37+
command: fmt
38+
args: --all -- --check
39+
Build:
40+
runs-on: ${{ matrix.os }}
41+
strategy:
42+
fail-fast: False
43+
matrix:
44+
os: [ubuntu-latest, macos-latest]
45+
# To enable windows build delete the line above and this one then uncoment the one under
46+
#os: [ubuntu-latest, macos-latest, windows-latest]
47+
# The "" is just debug
48+
release: ["", "--release"]
49+
steps:
50+
- name: Download commit
51+
uses: actions/checkout@v1
52+
with:
53+
fetch-depth: 1
54+
- name: Cache cargo
55+
id: cache-cargo
56+
uses: actions/cache@v1
57+
with:
58+
path: .cargo/
59+
key: ${{ runner.os }}-${{ matrix.release }}-cargo
60+
- name: Install latest nightly
61+
uses: actions-rs/toolchain@v1
62+
with:
63+
toolchain: nightly
64+
- name: Build
65+
uses: actions-rs/cargo@v1
66+
with:
67+
toolchain: nightly
68+
command: build
69+
args: ${{ matrix.release }} --all
70+
- name: Test
71+
uses: actions-rs/cargo@v1
72+
with:
73+
toolchain: nightly
74+
command: test
75+
args: ${{ matrix.release }} --all
76+
env:
77+
RUST_TEST_THREADS: 1
78+
- name: Prepare uploads
79+
shell: bash
80+
run: mkdir bins/ && for i in $(ls target/{debug,release}/{libsvm_runtime_c_api.{so,dylib,dll},svm_wasmer.h}); do mv $i bins/; done
81+
- name: Upload bins
82+
uses: actions/upload-artifact@master
83+
with:
84+
name: bins-${{ runner.os }}${{ matrix.release }}
85+
path: bins/

.travis.yml

Lines changed: 0 additions & 71 deletions
This file was deleted.

scripts/ci.sh

Lines changed: 0 additions & 69 deletions
This file was deleted.

0 commit comments

Comments
 (0)