Skip to content

Commit 33ee237

Browse files
committed
Merge branch 'zh-cn_update0918' into zh-cn
# Conflicts: # po/zh-cn.po
2 parents ca20c6e + e2d9afb commit 33ee237

File tree

562 files changed

+30556
-16337
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

562 files changed

+30556
-16337
lines changed

.all-contributorsrc

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,12 +95,77 @@
9595
"contributions": [
9696
"translation"
9797
]
98+
},
99+
{
100+
"login": "julio4",
101+
"name": "julio4",
102+
"avatar_url": "https://avatars.githubusercontent.com/u/30329843?v=4",
103+
"profile": "http://julio4.com",
104+
"contributions": [
105+
"code",
106+
"tool"
107+
]
108+
},
109+
{
110+
"login": "hgedia",
111+
"name": "Haresh Gedia",
112+
"avatar_url": "https://avatars.githubusercontent.com/u/32969555?v=4",
113+
"profile": "https://github.com/hgedia",
114+
"contributions": [
115+
"doc"
116+
]
117+
},
118+
{
119+
"login": "Darlington02",
120+
"name": "Darlington Nnam",
121+
"avatar_url": "https://avatars.githubusercontent.com/u/75126961?v=4",
122+
"profile": "http://0xdarlington.disha.page",
123+
"contributions": [
124+
"code"
125+
]
126+
},
127+
{
128+
"login": "tiagofneto",
129+
"name": "Tiago Neto",
130+
"avatar_url": "https://avatars.githubusercontent.com/u/46165861?v=4",
131+
"profile": "https://github.com/tiagofneto",
132+
"contributions": [
133+
"review"
134+
]
135+
},
136+
{
137+
"login": "omahs",
138+
"name": "omahs",
139+
"avatar_url": "https://avatars.githubusercontent.com/u/73983677?v=4",
140+
"profile": "https://github.com/omahs",
141+
"contributions": [
142+
"code"
143+
]
144+
},
145+
{
146+
"login": "shramee",
147+
"name": "Shramee Srivastav",
148+
"avatar_url": "https://avatars.githubusercontent.com/u/11048263?v=4",
149+
"profile": "http://shramee.me",
150+
"contributions": [
151+
"code"
152+
]
153+
},
154+
{
155+
"login": "dbejarano820",
156+
"name": "Daniel Bejarano",
157+
"avatar_url": "https://avatars.githubusercontent.com/u/58019353?v=4",
158+
"profile": "https://github.com/dbejarano820",
159+
"contributions": [
160+
"code"
161+
]
98162
}
99163
],
100164
"contributorsPerLine": 7,
101165
"skipCi": true,
102166
"repoType": "github",
103167
"repoHost": "https://github.com",
168+
"badgeTemplate": "[![All Contributors](https://img.shields.io/badge/all_contributors-<%= contributors.length %>-orange.svg?style=flat-square)](#contributors)",
104169
"projectName": "cairo-book.github.io",
105170
"projectOwner": "cairo-book"
106171
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
name: Cairo Verify
2+
3+
description: Run the cairo-verify tools on all cairo programs in the book.
4+
5+
runs:
6+
using: composite
7+
steps:
8+
- uses: actions/checkout@v3
9+
- uses: software-mansion/setup-scarb@v1
10+
with:
11+
scarb-version: "0.7.0"
12+
13+
- name: Install cairo-verify
14+
run: cargo install --path cairo-verify --locked
15+
shell: bash
16+
17+
- name: Run cairo-verify and generate summary
18+
run: cairo-verify >> $GITHUB_STEP_SUMMARY
19+
shell: bash

.github/workflows/install-mdbook/action.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@ runs:
77
steps:
88
# The --locked flag is important for reproducible builds.
99
- name: Install mdbook
10-
run: cargo install mdbook --locked --version 0.4.28
10+
run: cargo install mdbook --locked --version 0.4.31
1111
shell: bash
1212

1313
- name: Install mdbook-i18n-helpers
1414
run: cargo install mdbook-i18n-helpers --locked --version 0.1.0
1515
shell: bash
1616

17-
- name: Install cairo programs verifier
17+
- name: Install mdbook-cairo preprocessor
1818
run: cargo install --path mdbook-cairo --locked
1919
shell: bash

.github/workflows/mdbook.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -36,33 +36,37 @@ jobs:
3636
- name: Setup Rust cache
3737
uses: ./.github/workflows/setup-rust-cache
3838

39+
- name: Cairo Verify
40+
uses: ./.github/workflows/cairo-verify
41+
3942
- name: Install mdbook
4043
uses: ./.github/workflows/install-mdbook
4144

4245
- name: Build in English
4346
run: |
4447
mdbook build -d book
4548
49+
- name: Copy WASM-Cairo pkg
50+
run: |
51+
cp -r theme/pkg book
52+
cp -r theme/js book
53+
4654
- name: Build all translations
4755
run: |
4856
for po_lang in $(cat ./LANGUAGES); do
4957
echo "::group::Building $po_lang translation"
5058
MDBOOK_BOOK__LANGUAGE=$po_lang \
5159
mdbook build -d book/$po_lang
52-
mv book/$po_lang/html book/html/$po_lang
5360
echo "::endgroup::"
5461
done
5562
56-
- name: Verify Cairo programs
57-
uses: ./.github/workflows/verify-cairo-programs
58-
5963
- name: Setup Pages
6064
uses: actions/configure-pages@v3
6165

6266
- name: Upload artifact
6367
uses: actions/upload-pages-artifact@v1
6468
with:
65-
path: ./book/html
69+
path: ./book
6670

6771
- name: Deploy to GitHub Pages
6872
id: deployment

.github/workflows/verify-cairo-programs/action.yml

Lines changed: 0 additions & 24 deletions
This file was deleted.

.github/workflows/verify_programs.yml

Lines changed: 9 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -13,30 +13,18 @@ jobs:
1313
- name: Checkout
1414
uses: actions/checkout@v3
1515

16+
- name: Setup Scarb
17+
uses: software-mansion/setup-scarb@v1
18+
with:
19+
scarb-version: "0.7.0"
20+
1621
- name: Setup Rust cache
1722
uses: ./.github/workflows/setup-rust-cache
1823

19-
- name: Install mdbook
20-
uses: ./.github/workflows/install-mdbook
21-
22-
- name: Build in English
23-
run: |
24-
mdbook build -d book
25-
26-
- name: Copy Cairo program verifier script
27-
run: |
28-
cp mdbook-cairo/scripts/cairo_programs_verifier.sh book/cairo/cairo-programs/
24+
- name: Install cairo-verify
25+
run: cargo install --path cairo-verify --locked
2926
shell: bash
3027

31-
- name: Verify Cairo programs
32-
uses: addnab/docker-run-action@v3
33-
with:
34-
image: starknet/cairo:1.0.0
35-
options: -v ${{ github.workspace }}/book/cairo/cairo-programs:/cairo
36-
run: |
37-
sh /cairo/cairo_programs_verifier.sh false > /cairo/summary.md
38-
39-
- name: Generate job summary
40-
run: cat book/cairo/cairo-programs/summary.md >> $GITHUB_STEP_SUMMARY
28+
- name: Run cairo-verify and generate summary
29+
run: cairo-verify >> $GITHUB_STEP_SUMMARY
4130
shell: bash
42-
if: always()

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,4 @@ output
44

55
# Editors tmp files.
66
*~
7+
.idea/

.tool-versions

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
scarb 0.7.0

0 commit comments

Comments
 (0)