Repository navigation
61 lines (51 loc) · 2.03 KB
/
Copy pathci.yml
File metadata and controls
61 lines (51 loc) · 2.03 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
name: CI
# GitHub-HOSTED runners only. This module is pure Rust and must NOT contend
# with ePHPm's self-hosted (ephemerd) fleet, which is reserved for PHP-linked
# and Windows/macOS legs of core.
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
CARGO_TERM_COLOR: always
# Fetch the ephpm-middleware git-rev dependency with the system git rather
# than libgit2 — robust against auth/proxy quirks. The pinned repo
# (ephpm/ephpm) is public, so no credentials are needed.
CARGO_NET_GIT_FETCH_WITH_CLI: "true"
jobs:
build-and-test:
name: linux-x86_64-gnu build + test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Install Rust (stable + nightly rustfmt)
run: |
rustup toolchain install stable --profile minimal --component clippy
rustup toolchain install nightly --profile minimal --component rustfmt
rustup default stable
rustc --version && cargo --version
- name: Cache cargo
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: cargo-${{ runner.os }}-${{ hashFiles('Cargo.toml') }}
- name: Format check (nightly — import grouping)
run: cargo +nightly fmt --all -- --check
- name: Clippy (pedantic, warnings = errors)
run: cargo clippy --all-targets -- -D warnings
- name: Build the cdylib (proves the ABI links against the pinned host)
run: cargo build --release --lib
- name: Assert the cdylib artifact exists
run: |
set -euo pipefail
test -f target/release/libgithub_auth.so
file target/release/libgithub_auth.so
# It must export the module entry points the host dlopen's.
nm -D --defined-only target/release/libgithub_auth.so | grep -E 'ephpm_middleware_(init|invoke|describe|shutdown)' \
|| { echo "missing ephpm_middleware_* exports"; exit 1; }
- name: Test
run: cargo test --all-targets