forked from Dicklesworthstone/beads_rust
-
Notifications
You must be signed in to change notification settings - Fork 0
95 lines (81 loc) · 2.59 KB
/
conformance.yml
File metadata and controls
95 lines (81 loc) · 2.59 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
name: Conformance
on:
workflow_dispatch:
inputs:
strict_mode:
description: 'Fail on any normalization differences'
type: boolean
default: false
verbose:
description: 'Enable verbose output'
type: boolean
default: false
schedule:
- cron: '0 6 * * 1' # Weekly Monday 6am UTC
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: 1
permissions:
contents: read
jobs:
conformance:
name: br↔bd Conformance
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@master
with:
toolchain: nightly
- name: Cache cargo
uses: Swatinem/rust-cache@ad397744b0d591a723ab90405b7247fac0e6b8db # v2
- name: Install Go
uses: actions/setup-go@d35c59abb061a4a6fb18e82ac0862c26744d6ab5 # v5
with:
go-version: '1.23'
cache: false
- name: Build br
run: cargo build --release
- name: Clone and build bd (Go beads)
run: |
git clone --depth 1 https://github.com/Dicklesworthstone/beads.git ../beads-go
cd ../beads-go
go build -o bd ./cmd/beads
echo "BD_BINARY=$(pwd)/bd" >> $GITHUB_ENV
- name: Verify binaries
run: |
echo "=== br version ==="
./target/release/br --version
echo ""
echo "=== bd version ==="
$BD_BINARY version || true
- name: Run conformance tests
run: |
VERBOSE_FLAG=""
if [ "${{ inputs.verbose }}" = "true" ]; then
VERBOSE_FLAG="--verbose"
fi
scripts/conformance.sh $VERBOSE_FLAG
env:
BD_BINARY: ${{ env.BD_BINARY }}
CONFORMANCE_STRICT: ${{ inputs.strict_mode && '1' || '0' }}
CONFORMANCE_TIMEOUT: 180
NO_COLOR: 1
- name: Upload conformance summary
if: always()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: conformance-summary
path: target/test-artifacts/conformance_summary.json
if-no-files-found: ignore
- name: Upload conformance artifacts
if: failure()
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
with:
name: conformance-artifacts
path: target/test-artifacts/conformance/
if-no-files-found: ignore