Skip to content

Commit

Permalink
ci: Run macOS tests on m1 processor (#1141)
Browse files Browse the repository at this point in the history
* ci: Run macOS tests on m1 processor

* ci: Install weasyprint with homebrew

* test: Rename draft-miek-test.v3.xml

The macOS tox tests in GHA gets confused this with the v3 converted file
of the non v2 version.
  • Loading branch information
kesara authored Oct 26, 2024
1 parent 2fd70e8 commit 0e8fee4
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 4 deletions.
12 changes: 9 additions & 3 deletions .github/workflows/checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ jobs:

tests-macos:
name: Unit Tests (macOS)
runs-on: macos-12
runs-on: macos-latest
if: github.event_name == 'pull_request'

strategy:
Expand Down Expand Up @@ -131,14 +131,19 @@ jobs:
- name: Install dependencies
run: |
brew install pango pillow libffi groff make diffutils
brew install make diffutils
# Install WeasyPrint 61.2
brew tap-new --no-git custom/weasyprint
brew extract --git-revision edb83fc7c8bb9987bdecb810e61281c5adc47c73 weasyprint custom/weasyprint
brew install [email protected]
echo "Installing pip + wheel..."
python -m pip install --upgrade pip wheel
echo "Installing requirements.txt + test dependencies..."
python -m pip install -r requirements.txt tox tox-gh-actions certifi decorator dict2xml pyflakes "pypdf>=4.1.0" "weasyprint==61.2" "pydyf<0.10.0"
- name: Generate Valid Tests
run: |
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_FALLBACK_LIBRARY_PATH
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
make yestests || true
cp -af tests/out/. tests/valid
Expand All @@ -147,8 +152,9 @@ jobs:
env:
PLATFORM: macos-latest
run: |
export DYLD_FALLBACK_LIBRARY_PATH=/opt/homebrew/lib:$DYLD_FALLBACK_LIBRARY_PATH
echo "/usr/local/opt/make/libexec/gnubin" >> $GITHUB_PATH
tox
env 'TOX_OVERRIDE=testenv.pass_env+=DYLD_FALLBACK_LIBRARY_PATH' tox
tests-windows:
name: Unit Tests (Windows)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ tests/out/%.v2v3.xml: tests/input/%.xml install
@doc=$(basename $@); printf ' '; xmllint --noout --xinclude --relaxng xml2rfc/data/v3.rng $$doc.xml
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --v2v3 --strict --legacy-date-format --add-xinclude $< --out $@"

tests/out/%.v3add-xinclude.xml: tests/input/draft-miek-test.v3.xml install
tests/out/%.v3add-xinclude.xml: tests/input/draft-miek-test-v3.xml install
@PS4=" " /bin/bash -cx "xml2rfc --skip-config --allow-local-file-access --cache \"$${IETF_TEST_CACHE_PATH}\" --no-network --v2v3 --add-xinclude $< --out $@"

tests/out/%.v3add-xinclude-w-revision.xml: tests/input/draft-template.xml install
Expand Down
File renamed without changes.
2 changes: 2 additions & 0 deletions tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,8 @@ commands =

allowlist_externals =
make
diff
groff

deps =
pyflakes
Expand Down

0 comments on commit 0e8fee4

Please sign in to comment.