-
-
Notifications
You must be signed in to change notification settings - Fork 42
90 lines (85 loc) · 2.91 KB
/
ci.yaml
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
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
name: ci-flow
on:
pull_request:
push:
branches:
- master
- "releases/*"
# tags-ignore:
# - "[0-9]+.[0-9]+.[0-9]+*"
permissions:
contents: read
jobs:
build:
runs-on: ${{ matrix.os.imageName }}
strategy:
matrix:
rust_toolchain: ["stable"]
os:
- imageName: ubuntu-latest
profile_rustup: default
profile_ci_flow: ci-static-code-analysis-tasks
target_platform: x86_64-unknown-linux-gnu
- target_platform: x86_64-apple-darwin
imageName: "macOS-latest"
profile_rustup: minimal
profile_ci_flow: none
# - imageName: "macOS-latest"
# profile_rustup: minimal
# profile_ci_flow: none
# target_platform: aarch64-apple-darwin
# - imageName: windows-latest
# profile_rustup: minimal
# profile_ci_flow: none
# target_platform:
steps:
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- uses: actions-rs/toolchain@v1
with:
toolchain: ${{ matrix.rust_toolchain }}
target: ${{ matrix.os.target_platform }}
override: true
profile: ${{ matrix.os.profile_rustup }}
- uses: davidB/rust-cargo-make@v1
- name: Run tests
run: cargo make --disable-check-for-updates --profile "${{ matrix.os.profile_ci_flow }}" ci-flow
env:
TARGET: ${{ matrix.os.target_paddlatform }}
# for list of xcode sdk see https://help.github.com/en/actions/automating-your-workflow-with-github-actions/software-installed-on-github-hosted-runners#xcode
# DEVELOPER_DIR: "/Applications/Xcode_11.app/Contents/Developer"
CARGO_MAKE_RUN_CODECOV: "false"
# to have CODECOV_TOKEN go to https://codecov.io/gh/${GITHUB_USER}/${GITHUB_REPO}
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
integration:
# Integration tests are linux only
runs-on: ubuntu-latest
steps:
- uses: nolar/setup-k3d-k3s@v1
with:
# version: v1.20
# k3d-kube
k3d-name: kube
# Used to avoid rate limits when fetching the releases from k3s repo.
# Anonymous access is limited to 60 requests / hour / worker
# github-token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/checkout@v4
- uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Run on k3d
run: cargo run