Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support Apple Silicon locally, and test there's no regression #58

Merged
merged 6 commits into from
Apr 8, 2024
Merged

Support Apple Silicon locally, and test there's no regression #58

merged 6 commits into from
Apr 8, 2024

Conversation

danyalaytekin
Copy link
Contributor

@danyalaytekin danyalaytekin commented Apr 4, 2024

This PR:

  • allows the Docker image to build on Apple Silicon locally by making amd64 explicit (there might be another way to do this than the way I've chosen, so you're welcome to change it)
  • adds a test.yml to build the GitHub Action, and then use it to turn the readme into a PDF, including during a pull request. This doesn't test the Apple Silicon compatibility; it just tests that I haven't introduced a regression, and it also might be useful for future pull requests

Testing the build in Apple Silicon on GitHub Actions has not been implemented, because I don't have the time to implement Docker setup in macos-latest, if this is even possible. In any case, it still won't allow the action to be used in GitHub Actions on macos-latest, as observed by #52. This is all just to make local usage easier.

Motivation

  1. On Apple Silicon locally, nektos/act fails to run a job which uses markdown-to-pdf, with or without a flag forcing it into amd64 mode:
    $ brew install act
    $ act --platform=linux/amd64
    
    [build.yml/pdf           ]   ❌  Failure - Main BaileyJM02/[email protected]
    [build.yml/pdf           ] The command '/bin/sh -c wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - &&  ... (etc) ... && rm -rf /var/lib/apt/lists/*' returned a non-zero code: 100
  2. markdown-to-pdf also fails to build locally.

@danyalaytekin
Copy link
Contributor Author

danyalaytekin commented Apr 4, 2024

The new workflow hasn't been picked up in this repo yet, but here's an example on my fork:

@danyalaytekin danyalaytekin changed the title Support Apple Silicon locally, and test there's no regression [WIP, draft] Support Apple Silicon locally, and test there's no regression Apr 4, 2024
@danyalaytekin danyalaytekin marked this pull request as draft April 4, 2024 04:17
@danyalaytekin danyalaytekin changed the title [WIP, draft] Support Apple Silicon locally, and test there's no regression Support Apple Silicon locally, and test there's no regression Apr 4, 2024
@danyalaytekin danyalaytekin marked this pull request as ready for review April 4, 2024 04:28
@BaileyJM02 BaileyJM02 merged commit 7562ca0 into BaileyJM02:main Apr 8, 2024
2 checks passed
@BaileyJM02
Copy link
Owner

Appreciate the contribution - thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants