forked from 0xMiden/miden-vm
-
Notifications
You must be signed in to change notification settings - Fork 0
114 lines (107 loc) · 3.8 KB
/
Copy pathtest.yml
File metadata and controls
114 lines (107 loc) · 3.8 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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
name: test
on:
push:
branches: [main, next]
pull_request:
types: [opened, reopened, synchronize]
permissions:
contents: read
jobs:
test:
name: test on ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: taiki-e/install-action@nextest
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Build tests
run: make test-build
- name: test
run: make test
doc-tests:
name: doc-tests
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Run doc-tests
run: make test-docs
check-core-lib-docs:
name: check core library docs
runs-on: ubuntu-latest
needs: [test, doc-tests]
steps:
- uses: actions/checkout@v4
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Build core library and generate documentation
run: |
# Build core library with documentation generation enabled
MIDEN_BUILD_LIB_DOCS=1 cargo build -p miden-core-lib
- name: Check for documentation changes in crates/lib/core/docs
run: |
if [ -n "$(git status --porcelain crates/lib/core/docs)" ]; then
echo "ERROR: Found uncommitted changes in crates/lib/core/docs/"
echo "This indicates that the assembly source code has changed but the documentation was not updated."
echo "Please commit the generated documentation changes before merging."
echo ""
echo "To fix this:"
echo "1. Run: MIDEN_BUILD_LIB_DOCS=1 cargo build -p miden-core-lib"
echo "2. Commit the changes in crates/lib/core/docs/"
echo ""
echo "Uncommitted changes:"
git status crates/lib/core/docs
echo ""
echo "Diff:"
git diff crates/lib/core/docs
exit 1
else
echo "No documentation changes in crates/lib/core/docs/ - OK"
fi
run-examples:
name: run masm examples
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Run masm examples
run: make run-examples
check-features:
name: check all feature combinations
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Cleanup large tools for build space
uses: ./.github/actions/cleanup-runner
- uses: Swatinem/rust-cache@v2
with:
save-if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/next' }}
- name: Install rust
run: rustup update --no-self-update
- name: Install cargo-hack
uses: taiki-e/install-action@cargo-hack
- name: Check all feature combinations
run: make check-features