-
Notifications
You must be signed in to change notification settings - Fork 0
99 lines (82 loc) · 3.13 KB
/
Copy pathci.yml
File metadata and controls
99 lines (82 loc) · 3.13 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
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
91
92
93
94
95
96
97
98
99
# InQL CI — Incan library package
#
# Checks out the pinned Incan compiler source, installs it through Incan's
# downstream install action, then runs the InQL package checks against that
# local binary.
name: CI
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
concurrency:
group: ci-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
INCAN_REF: release/v0.3
EXPECTED_INCAN_VERSION: 0.3.0
RUST_BACKTRACE: 1
INCAN_NO_BANNER: 1
INCAN_GENERATED_CARGO_TARGET_DIR: ${{ github.workspace }}/.incan-generated-cargo-target
INCAN_TEST_SHARED_TARGET_DIR: ${{ github.workspace }}/.incan-generated-cargo-target
jobs:
inql:
name: InQL (build + test)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Check out InQL
uses: actions/checkout@v4
- name: Check out Incan
uses: actions/checkout@v4
with:
repository: encero-systems/incan
ref: ${{ env.INCAN_REF }}
path: incan
- name: Install Incan compiler
uses: ./incan/.github/actions/install-incan
with:
profile: debug
cache-shared-key: inql-incan-${{ runner.os }}-${{ env.EXPECTED_INCAN_VERSION }}
- name: Cache generated InQL Cargo artifacts
uses: actions/cache@v4
with:
path: .incan-generated-cargo-target
key: inql-generated-cargo-${{ runner.os }}-incan-${{ env.EXPECTED_INCAN_VERSION }}-${{ hashFiles('incan.lock', 'incan.toml') }}
restore-keys: |
inql-generated-cargo-${{ runner.os }}-incan-${{ env.EXPECTED_INCAN_VERSION }}-
- name: Cache generated InQL Rust metadata
uses: actions/cache@v4
with:
path: |
target/incan_lock/rust_inspect/**/Cargo.toml
target/incan_lock/rust_inspect/**/Cargo.lock
target/incan_lock/rust_inspect/**/src/main.rs
target/incan_lock/rust_inspect/**/.incan_rust_inspect_cache.json
target/incan_lock/rust_inspect/**/.incan_rust_inspect_fingerprint
key: inql-rust-inspect-${{ runner.os }}-incan-${{ env.EXPECTED_INCAN_VERSION }}-${{ hashFiles('incan.lock', 'incan.toml') }}-${{ hashFiles('src/**/*.incn', 'tests/**/*.incn', 'scripts/**/*.incn') }}
restore-keys: |
inql-rust-inspect-${{ runner.os }}-incan-${{ env.EXPECTED_INCAN_VERSION }}-${{ hashFiles('incan.lock', 'incan.toml') }}-
inql-rust-inspect-${{ runner.os }}-incan-${{ env.EXPECTED_INCAN_VERSION }}-
- name: Show toolchain
run: |
incan --version
test "$(incan --version)" = "incan ${EXPECTED_INCAN_VERSION}"
rustc --version
- name: Format check (package .incn)
run: make fmt-check
- name: Test style check
run: make test-style
- name: Function registry metadata check
run: make registry-metadata
- name: Build library
run: make build
- name: Run tests
run: make test
- name: Pub consumer smoke check
run: make smoke-consumer