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

Commit

Permalink
Changing to github actions (#35)
Browse files Browse the repository at this point in the history
* Change to Github Action.

* Adding cache.
  • Loading branch information
Jorropo authored and YaronWittenstein committed Nov 13, 2019
1 parent d4e7713 commit 6f08c7d
Show file tree
Hide file tree
Showing 3 changed files with 85 additions and 140 deletions.
85 changes: 85 additions & 0 deletions .github/workflows/rust.yml
@@ -0,0 +1,85 @@
name: CI

on:
push:
branches:
- master
- develop
pull_request:
branches:
- master
- develop

jobs:
Lint:
runs-on: ubuntu-latest
strategy:
fail-fast: False
steps:
- name: Download commit
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache cargo
id: cache-cargo
uses: actions/cache@v1
with:
path: ~/.cargo/
key: ${{ runner.os }}-lint-cargo
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Lint
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: fmt
args: --all -- --check
Build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: False
matrix:
os: [ubuntu-latest, macos-latest]
# To enable windows build delete the line above and this one then uncoment the one under
#os: [ubuntu-latest, macos-latest, windows-latest]
# The "" is just debug
release: ["", "--release"]
steps:
- name: Download commit
uses: actions/checkout@v1
with:
fetch-depth: 1
- name: Cache cargo
id: cache-cargo
uses: actions/cache@v1
with:
path: .cargo/
key: ${{ runner.os }}-${{ matrix.release }}-cargo
- name: Install latest nightly
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
- name: Build
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: build
args: ${{ matrix.release }} --all
- name: Test
uses: actions-rs/cargo@v1
with:
toolchain: nightly
command: test
args: ${{ matrix.release }} --all
env:
RUST_TEST_THREADS: 1
- name: Prepare uploads
shell: bash
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
- name: Upload bins
uses: actions/upload-artifact@master
with:
name: bins-${{ runner.os }}${{ matrix.release }}
path: bins/
71 changes: 0 additions & 71 deletions .travis.yml

This file was deleted.

69 changes: 0 additions & 69 deletions scripts/ci.sh

This file was deleted.

0 comments on commit 6f08c7d

Please sign in to comment.