mirrored from https://www.bouncycastle.org/repositories/bc-rust
-
Notifications
You must be signed in to change notification settings - Fork 14
Expand file tree
/
Copy pathpublish_doc_benches_to_ghpages.yaml
More file actions
91 lines (88 loc) · 2.59 KB
/
Copy pathpublish_doc_benches_to_ghpages.yaml
File metadata and controls
91 lines (88 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
name: Build and Publish Docs
on:
pull_request:
push:
branches: [ 'main' ]
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build_docs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: cargo doc
- name: copy to output
run: cp -r ./target/doc ./gh-pages
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: bc-rust-docs
path: ./target/doc
code_stats:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Run code quality script
run: ./dev_scripts/quality_stats.sh ./crypto > ./code_stats.txt
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: code_quality_stats
path: ./code_stats.txt
run_benches:
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/main'
steps:
- name: Checkout code
uses: actions/checkout@v4
- run: cargo bench --all
- name: Save artifacts
uses: actions/upload-artifact@v4
with:
name: bc-rust-benches
path: ./target/criterion
collect_ghpages:
if: github.ref == 'refs/heads/main'
needs: [build_docs, code_stats, run_benches]
runs-on: ubuntu-latest
steps:
- run: mkdir ./gh-pages
- name: Get docs from previous job
uses: actions/download-artifact@v4
with:
name: bc-rust-docs
path: ./gh-pages/
- name: Get code stats from previous job
uses: actions/download-artifact@v4
with:
name: code_quality_stats
path: ./gh-pages/
- name: Get benches from previous job
uses: actions/download-artifact@v4
with:
name: bc-rust-benches
path: ./gh-pages/benches
- name: Archive Compatibility Matrix For Download
uses: actions/upload-pages-artifact@v3
with:
path: ./gh-pages
publish_to_gh_pages:
if: github.ref == 'refs/heads/main'
needs: collect_ghpages
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Update git pages with new compatibiliy matrix
id: deployment
uses: actions/deploy-pages@v4