Skip to content

Commit

Permalink
feat(ci): Initial CI support (#121)
Browse files Browse the repository at this point in the history
Add workflow that performs basic test on Linux and Windows.

Support Ruby 3.1 and higher.

---------

Co-authored-by: Raphael <[email protected]>
  • Loading branch information
koppor and reitzig authored Mar 9, 2024
1 parent e72d127 commit 42819f4
Show file tree
Hide file tree
Showing 5 changed files with 81 additions and 1 deletion.
72 changes: 72 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,72 @@
on:
push:
branches:
- master
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.ref }}
cancel-in-progress: true
jobs:
test-pdflatex-linux-windows:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
ruby: [ '3.1', '3.2', '3.3' ]
name: "${{ matrix.os }} / ruby ${{ matrix.ruby }}"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup dependencies
run: |
bundle update --bundler
bundle install
- name: Install TeX Live
uses: zauguin/install-texlive@v3
with:
packages: >
latex-bin scheme-basic
- name: ltx2any
run: |
ruby ltx2any.rb test/test.tex
test-pdflatex-win:
strategy:
fail-fast: false
matrix:
ruby: [ '3.1', '3.2', '3.3' ]
name: "windows-latest / ruby ${{ matrix.ruby }}"
runs-on: windows-latest
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby }}
bundler-cache: true
- name: Setup dependencies
run: |
bundle update --bundler
bundle install
- name: Install MiKTeX
run: |
choco install miktex --no-progress
echo "C:\Program Files\MiKTeX\miktex\bin\x64" | Out-File -FilePath $env:GITHUB_PATH -Encoding utf8
- name: Configure MiKTeX
run: |
initexmf --admin --set-config-value=[MPM]AutoInstall=1
miktex --admin packages update-package-database
miktex --admin packages update
miktex packages update
miktex --admin packages install cm-super
miktex --admin fndb refresh
initexmf --admin --update-fndb
initexmf --admin --mklinks --force
updmap --admin
initexmf --report > miktex-report.txt
- name: ltx2any
run: |
ruby ltx2any.rb test/test.tex
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
.idea/
test_tmp
test.log.md
test.pdf
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ bug-free or reliable. Take care!

For using ltx2any without any bells and whistles, you should have

* Ruby 2.3.0 or higher and
* Ruby 3.1 or higher, and
* LaTeX and friends.

Any of the major (La)TeX distributions should provide the binaries you need.
Expand Down
Empty file added test/Texlivefile
Empty file.
5 changes: 5 additions & 0 deletions test/test.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
\documentclass{article}

\begin{document}
Hello world.
\end{document}

0 comments on commit 42819f4

Please sign in to comment.