Skip to content

Commit

Permalink
Install typst binary in CI workflow (#8)
Browse files Browse the repository at this point in the history
  • Loading branch information
daskol authored Sep 2, 2024
1 parent f18c1ac commit 520c97a
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 13 deletions.
21 changes: 11 additions & 10 deletions .github/workflows/on-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,17 @@ jobs:
run: |
rm -rfv /etc/apt/apt.conf.d/docker*
apt update
apt install -y --no-install-recommends ca-certificates git sqlite3
apt install -y --no-install-recommends \
ca-certificates git sqlite3 wget xz-utils
- name: Install Typst binary
env:
TYPST_RELEASE: https://github.com/typst/typst/releases/download
run: |
mkdir -p /usr/src/typst
cd /usr/src/typst
wget "$TYPST_RELEASE/v0.11.1/typst-x86_64-unknown-linux-musl.tar.xz"
tar xf typst-x86_64-unknown-linux-musl.tar.xz
install -Dm 755 -t /usr/local/bin typst-x86_64-unknown-linux-musl/typst
# NOTE Step order is important for checkout in container: git
# installation in container precedes repo checkout.
# NOTE Values of ${GITHUB_WORKSPACE} and ${{ github.workspace }} differ
Expand Down Expand Up @@ -99,16 +109,7 @@ jobs:
python -m pip install matplotlib 'numpy>=2'
# Testing dependencies.
python -m pip install mypy 'pytest>=8.2' pytest-cov pytest-dirty
- name: Run dirty tests with PyTest
if: 'github.event.pull_request'
run: |
export PYTHON_TAG=$(
python -c 'import sys; print(sys.implementation.cache_tag)')
export PYTHONPATH=$PWD:$PYTHONPATH
.github/scripts/run-dirty-tests.sh \
${{ github.event.pull_request.head.ref }}
- name: Run all tests with PyTest
if: '!github.event.pull_request'
run: |
export PYTHON_TAG=$(
python -c 'import sys; print(sys.implementation.cache_tag)')
Expand Down
12 changes: 11 additions & 1 deletion .github/workflows/on-schedule.yml
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,17 @@ jobs:
run: |
rm -rfv /etc/apt/apt.conf.d/docker*
apt update
apt install -y --no-install-recommends ca-certificates git sqlite3
apt install -y --no-install-recommends \
ca-certificates git sqlite3 wget xz-utils
- name: Install Typst binary
env:
TYPST_RELEASE: https://github.com/typst/typst/releases/download
run: |
mkdir -p /usr/src/typst
cd /usr/src/typst
wget $TYPST_RELEASE/v0.11.1/typst-x86_64-unknown-linux-musl.tar.xz
tar xf typst-x86_64-unknown-linux-musl.tar.xz
install -Dm 755 -t /usr/local/bin typst-x86_64-unknown-linux-musl/typst
- name: Set up Python 3.12
uses: actions/setup-python@v4
with:
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
![Linting and testing][1]
![Nightly][2]

[1]: https://github.com/daskol/typst-mpl-backend/actions/workflows/on-schedule.yml/badge.svg
[2]: https://github.com/daskol/typst-mpl-backend/actions/workflows/on-push.yml/badge.svg
[1]: https://github.com/daskol/typst-mpl-backend/actions/workflows/on-push.yml/badge.svg
[2]: https://github.com/daskol/typst-mpl-backend/actions/workflows/on-schedule.yml/badge.svg

# Typst Matplotlib Backend

Expand Down

0 comments on commit 520c97a

Please sign in to comment.