-
-
Notifications
You must be signed in to change notification settings - Fork 1
36 lines (30 loc) · 1.02 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: CI Pipeline
# Steps:
# 1. Run ci.yml for every push to the main branch
# 2. Run tag.yml for every completed run of the CI Pipeline
# 3. Run cd.yml for every tag-creation-success event
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build:
if: github.repository == 'jaywcjlove/sgo-rs'
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.rust == 'nightly' }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
rust: [1.74.0, stable, beta, nightly]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Save commit message to environment variable
run: echo "COMMIT_MESSAGE=${{ github.event.head_commit.message }}" >> $GITHUB_ENV
- name: Run dtolnay/rust-toolchain${{contains(matrix.rust, ' ') && ' for ' || '@'}}${{matrix.rust}}
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.rust }}
- name: Build
run: cargo build --release