Skip to content

Commit f99f296

Browse files
authored
Merge pull request #5 from StarknetAstro/zh-cn
Zh cn
2 parents 777ebb5 + 33ee237 commit f99f296

File tree

569 files changed

+27759
-14749
lines changed

Some content is hidden

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

569 files changed

+27759
-14749
lines changed

.all-contributorsrc

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -123,6 +123,42 @@
123123
"contributions": [
124124
"code"
125125
]
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+
]
126162
}
127163
],
128164
"contributorsPerLine": 7,
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.
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
1+
name: Verify Cairo programs compilation
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- main
7+
8+
jobs:
9+
compile_and_verify:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
- name: Checkout
14+
uses: actions/checkout@v3
15+
16+
- name: Setup Scarb
17+
uses: software-mansion/setup-scarb@v1
18+
with:
19+
scarb-version: "0.7.0"
20+
21+
- name: Setup Rust cache
22+
uses: ./.github/workflows/setup-rust-cache
23+
24+
- name: Install cairo-verify
25+
run: cargo install --path cairo-verify --locked
26+
shell: bash
27+
28+
- name: Run cairo-verify and generate summary
29+
run: cairo-verify >> $GITHUB_STEP_SUMMARY
30+
shell: bash

.github/workflows/verify_programs.yml.old

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

.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)