Skip to content

Commit c079907

Browse files
authored
chore: move CI to GitHub Actions (#89)
Move the CI from CircleCI to GitHub actions.
1 parent d68dd2d commit c079907

File tree

2 files changed

+62
-74
lines changed

2 files changed

+62
-74
lines changed

.circleci/config.yml

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

.github/workflows/ci.yml

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: CI
2+
3+
on: [pull_request, push]
4+
5+
# Cancel a job if there's a new on on the same branch started.
6+
# Based on https://stackoverflow.com/questions/58895283/stop-already-running-workflow-job-in-github-actions/67223051#67223051
7+
concurrency:
8+
group: ${{ github.ref }}
9+
cancel-in-progress: true
10+
11+
env:
12+
CARGO_INCREMENTAL: 0
13+
RUST_BACKTRACE: 1
14+
# Faster crates.io index checkout.
15+
CARGO_REGISTRIES_CRATES_IO_PROTOCOL: sparse
16+
RUST_LOG: debug
17+
18+
jobs:
19+
check_clippy:
20+
runs-on: ubuntu-24.04
21+
name: Clippy
22+
steps:
23+
- uses: actions/checkout@v4
24+
- name: Run cargo clippy
25+
run: cargo clippy --all-targets --workspace --all-features -- -D warnings
26+
27+
check_fmt:
28+
runs-on: ubuntu-24.04
29+
name: Checking fmt
30+
steps:
31+
- uses: actions/checkout@v4
32+
- name: Run cargo fmt
33+
run: cargo fmt --all -- --check
34+
35+
rustdoc:
36+
runs-on: ubuntu-24.04
37+
name: Rustdoc
38+
steps:
39+
- uses: actions/checkout@v4
40+
- name: Run rustdoc
41+
run: cargo rustdoc --all-features -- -D warnings
42+
43+
build:
44+
runs-on: ubuntu-24.04
45+
name: Release build
46+
steps:
47+
- uses: actions/checkout@v4
48+
- name: Run cargo release build
49+
run: cargo build --release
50+
51+
# Enable these tests once there's a runner with a GPU.
52+
#test_gpu:
53+
# runs-on: ubuntu-24.04
54+
# name: Test
55+
# steps:
56+
# - uses: actions/checkout@v4
57+
# - name: Install required packages
58+
# run: sudo apt install --no-install-recommends --yes libhwloc-dev nvidia-cuda-toolkit ocl-icd-opencl-dev
59+
# - name: Run tests
60+
# run: cargo test
61+
# - name: Run `add` example
62+
# run: cargo run --example add

0 commit comments

Comments
 (0)