Skip to content

Commit 8695fc5

Browse files
aster-voidclaude
andcommitted
ci: add CI and release workflows
- ci.yml: build/test on push and PR - release.yml: cross-platform build with artifact upload on main push and manual trigger 🤖 Generated with [Claude Code](https://claude.ai/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent 5b271e7 commit 8695fc5

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
build:
14+
runs-on: ubuntu-latest
15+
steps:
16+
- uses: actions/checkout@v4
17+
- uses: dtolnay/rust-toolchain@stable
18+
- run: cargo build
19+
20+
test:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- uses: actions/checkout@v4
24+
- uses: dtolnay/rust-toolchain@stable
25+
- run: cargo test

.github/workflows/release.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Release
2+
3+
on:
4+
push:
5+
branches: [main]
6+
workflow_dispatch:
7+
8+
env:
9+
CARGO_TERM_COLOR: always
10+
11+
jobs:
12+
build:
13+
strategy:
14+
matrix:
15+
include:
16+
- os: ubuntu-latest
17+
target: x86_64-unknown-linux-gnu
18+
artifact: rollcron-linux-x86_64
19+
- os: macos-latest
20+
target: x86_64-apple-darwin
21+
artifact: rollcron-macos-x86_64
22+
- os: macos-latest
23+
target: aarch64-apple-darwin
24+
artifact: rollcron-macos-aarch64
25+
- os: windows-latest
26+
target: x86_64-pc-windows-msvc
27+
artifact: rollcron-windows-x86_64.exe
28+
29+
runs-on: ${{ matrix.os }}
30+
31+
steps:
32+
- uses: actions/checkout@v4
33+
34+
- name: Install Rust toolchain
35+
uses: dtolnay/rust-toolchain@stable
36+
with:
37+
targets: ${{ matrix.target }}
38+
39+
- name: Build
40+
run: cargo build --release --target ${{ matrix.target }}
41+
42+
- name: Rename artifact (Unix)
43+
if: runner.os != 'Windows'
44+
run: mv target/${{ matrix.target }}/release/rollcron ${{ matrix.artifact }}
45+
46+
- name: Rename artifact (Windows)
47+
if: runner.os == 'Windows'
48+
run: mv target/${{ matrix.target }}/release/rollcron.exe ${{ matrix.artifact }}
49+
50+
- name: Upload artifact
51+
uses: actions/upload-artifact@v4
52+
with:
53+
name: ${{ matrix.artifact }}
54+
path: ${{ matrix.artifact }}
55+

0 commit comments

Comments
 (0)