-
Notifications
You must be signed in to change notification settings - Fork 0
60 lines (54 loc) · 1.9 KB
/
Copy pathbuild.yml
File metadata and controls
60 lines (54 loc) · 1.9 KB
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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
name: Build
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
jobs:
configure:
permissions:
contents: write
pull-requests: write
runs-on: ubuntu-latest
if: github.actor != 'dependabot[bot]'
steps:
- name: Pull request auto merge enabler
if: github.event_name == 'pull_request' && github.actor != 'dependabot[bot]'
uses: poad/github-pull-request-auto-merge-enable-action@3a9b27f412592f0eb2cd6649509178e1fcaf3ccf # v3.0.2
with:
pull_request_number: ${{ github.event.pull_request.number }}
github_token: ${{ secrets.GITHUB_TOKEN }}
repository: ${{ github.event.repository.name }}
owner: ${{ github.repository_owner }}
merge_method: SQUASH
build:
runs-on: ${{ matrix.config.os }}
strategy:
fail-fast: false
matrix:
config:
- { os: windows-latest, target: 'x86_64-pc-windows-msvc' }
- { os: macOS-latest, target: 'x86_64-apple-darwin' }
- { os: ubuntu-latest, target: 'x86_64-unknown-linux-gnu' }
- { os: ubuntu-latest, target: 'x86_64-unknown-linux-musl' }
# - { os: windows-latest, target: 'arch64-pc-windows-msvc' }
# - { os: macOS-11, target: 'aarch64-apple-darwin' }
# - { os: ubuntu-latest, target: 'aarch64-unknown-linux-gnu' }
# - { os: ubuntu-latest, target: 'aarch64-unknown-linux-musl' }
steps:
- name: Add cross build targets
run: rustup target add ${{ matrix.config.target }}
- name: Update Rust toolchain
run: rustup update
- name: Install cross
run: cargo install cross
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
with:
persist-credentials: false
- name: Build
run: cargo build --verbose
- name: Run tests
run: cargo test --verbose