Skip to content

Commit 6dbf391

Browse files
authored
Convert Travis CI pipeline to GitHub Actions pipeline (#34)
1 parent 31c75e1 commit 6dbf391

File tree

3 files changed

+56
-36
lines changed

3 files changed

+56
-36
lines changed

.github/workflows/ci.yml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Rust CI
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
branches:
9+
- master
10+
11+
jobs:
12+
build:
13+
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
rust:
17+
- stable
18+
- beta
19+
- nightly
20+
21+
steps:
22+
- name: Set up Rust
23+
uses: actions/checkout@v2
24+
- name: Install Rust
25+
uses: actions-rs/toolchain@v1
26+
with:
27+
toolchain: ${{ matrix.rust }}
28+
profile: minimal
29+
30+
- name: Clean
31+
run: cargo clean
32+
- name: Check with pathfinder_geometry features
33+
run: cargo check --features pathfinder_geometry
34+
- name: Check without default features
35+
run: cargo check --no-default-features
36+
- name: Run tests
37+
run: cargo test
38+
- name: Run benchmarks with pathfinder_geometry features
39+
run: cargo bench --no-run --features pathfinder_geometry
40+
- name: Run benchmarks without default features
41+
run: cargo bench --no-default-features --no-run
42+
43+
- name: Run after-success.sh
44+
run: |
45+
chmod +x after-success.sh
46+
./after-success.sh

.travis.yml

-27
This file was deleted.

after-success.sh

+10-9
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,22 @@
11
#!/usr/bin/env bash
22

33
# Clone the repository
4-
REMOTE_URL="$(git config --get remote.origin.url)";
5-
cd ${TRAVIS_BUILD_DIR}/.. && \
6-
git clone ${REMOTE_URL} "${TRAVIS_REPO_SLUG}-bench" && \
7-
cd "${TRAVIS_REPO_SLUG}-bench" && \
4+
REMOTE_URL="$(git config --get remote.origin.url)"
5+
cd $GITHUB_WORKSPACE/.. &&
6+
git clone $REMOTE_URL "${GITHUB_REPOSITORY}-bench" &&
7+
cd "${GITHUB_REPOSITORY}-bench" &&
88

99
# Bench master
10-
git checkout master && \
11-
cargo bench --bench benchmark -- --noplot --save-baseline before && \
10+
git checkout master &&
11+
cargo bench --bench eulerbench -- --noplot --save-baseline before &&
1212

1313
# Bench current branch
14-
git checkout ${TRAVIS_COMMIT} && \
15-
cargo bench --bench benchmark -- --noplot --save-baseline after && \
14+
git checkout $GITHUB_SHA &&
15+
cargo bench --bench eulerbench -- --noplot --save-baseline after &&
1616

1717
# Install https://github.com/BurntSushi/critcmp
18-
cargo install critcmp --force && \
18+
cargo install critcmp --force &&
1919

2020
# Compare the two generated benches
2121
critcmp before after;
22+

0 commit comments

Comments
 (0)