File tree Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Expand file tree Collapse file tree 1 file changed +29
-3
lines changed Original file line number Diff line number Diff line change 1- name : Rust
1+ name : CI for Rust Project
22
33on :
44 push :
1010 CARGO_TERM_COLOR : always
1111
1212jobs :
13+ # The original job to build and test on Ubuntu.
1314 build :
14-
1515 runs-on : ubuntu-latest
16-
1716 steps :
1817 - uses : actions/checkout@v4
18+ - name : Set up Rust toolchain
19+ uses : dtolnay/rust-toolchain@stable
1920 - name : Build
2021 run : cargo build --verbose
2122 - name : Run tests
2223 run : cargo test --verbose
24+
25+ # A new job specifically for building a macOS binary.
26+ # This job will run in parallel with the 'build' job.
27+ build-macos :
28+ # Use a macOS runner for this job.
29+ runs-on : macos-latest
30+
31+ steps :
32+ - name : Checkout repository
33+ uses : actions/checkout@v4
34+
35+ - name : Set up Rust toolchain
36+ uses : dtolnay/rust-toolchain@stable
37+
38+ # Build the project for the native macOS architecture (aarch64 for Apple Silicon).
39+ - name : Build project for macOS (aarch64)
40+ run : cargo build --release --target aarch64-apple-darwin
41+
42+ # Package the resulting binary as an artifact for easy download.
43+ # The path assumes your crate is named "LSTimer". Adjust if necessary.
44+ - name : Upload artifact
45+ uses : actions/upload-artifact@v4
46+ with :
47+ name : macos-release-build
48+ path : target/aarch64-apple-darwin/release/LSTimer
You can’t perform that action at this time.
0 commit comments