Skip to content

Commit

Permalink
Add python cache
Browse files Browse the repository at this point in the history
Signed-off-by: Hollow Man <[email protected]>
  • Loading branch information
HollowMan6 committed Jan 6, 2023
1 parent 1716a5c commit 0234b3c
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/python-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.7", "3.8", "3.9", "3.10"]
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11"]

steps:
- uses: actions/checkout@v2
Expand Down
17 changes: 15 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,10 @@ jobs:
with:
submodules: 'recursive'
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install mdbook related backend
if: matrix.backend-depends != ''
run: |
Expand All @@ -176,7 +180,8 @@ jobs:
- name: Build mdbook-pdf dev and install
run: |
cargo build
sudo pip3 install .
mkdir -p ~/.cache/pip
sudo pip install .
mv target/debug/mdbook-pdf /usr/local/bin/
- name: Build Test Docs for PDF
run: |
Expand All @@ -193,6 +198,8 @@ jobs:
echo "margin-left = 0.5" >> book.toml
echo "margin-right = 0.5" >> book.toml
echo "static-site-url = '${{ matrix.static-url }}'" >> book.toml
echo "header-template = \"<h3 style='font-size:8px; margin-left: 48%' class='title'></h3>\"" >> book.toml
echo "footer-template = \"<p style='font-size:10px; margin-left: 48%'><span class='pageNumber'></span> / <span class='totalPages'></span></p>\"" >> book.toml
echo "[output.pdf-outline]" >> book.toml
fi
mdbook build
Expand Down Expand Up @@ -268,6 +275,10 @@ jobs:
with:
submodules: 'recursive'
- uses: Swatinem/rust-cache@v2
- uses: actions/setup-python@v4
with:
python-version: '3.10'
cache: 'pip'
- name: Install mdbook related backend
if: matrix.backend-depends != ''
run: |
Expand All @@ -281,7 +292,7 @@ jobs:
- name: Build mdbook-pdf dev and install
run: |
cargo build
pip3 install .
pip install .
cp target/debug/mdbook-pdf.exe mdbook_exec
- name: Build Test Docs for PDF
run: |
Expand All @@ -298,6 +309,8 @@ jobs:
echo "margin-left = 0.5" >> book.toml
echo "margin-right = 0.5" >> book.toml
echo "static-site-url = '${{ matrix.static-url }}'" >> book.toml
echo "header-template = `"<h3 style='font-size:8px; margin-left: 48%' class='title'></h3>`"" >> book.toml
echo "footer-template = `"<p style='font-size:10px; margin-left: 48%'><span class='pageNumber'></span> / <span class='totalPages'></span></p>`"" >> book.toml
echo "[output.pdf-outline]" >> book.toml
mdbook build
- name: Upload PDF File to Artifact
Expand Down

0 comments on commit 0234b3c

Please sign in to comment.