Skip to content

Commit

Permalink
Test reproducible sdist build
Browse files Browse the repository at this point in the history
  • Loading branch information
carmenbianca committed Jul 28, 2023
1 parent 7d297e9 commit 5959e43
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,30 @@ jobs:
- name: Create docs with Sphinx
run: |
make docs-ci
reproducible:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install poetry
run: |
pip install poetry
- name: Build package
run: |
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) poetry build --format sdist
- name: Get md5sum
id: md5sum_1
run: echo "md5sum=$(md5sum dist/reuse*.tar.gz)" >> $GITHUB_OUTPUT
- name: Build package again
run: |
SOURCE_DATE_EPOCH=$(git log -1 --pretty=%ct) poetry build --format sdist
- name: Get md5sum again
id: md5sum_2
run: echo "md5sum=$(md5sum dist/reuse*.tar.gz)" >> $GITHUB_OUTPUT
- name: Check that the md5sums are identical
run: |
[[ ${{ steps.md5sum_1.outputs.md5sum }} == ${{ steps.md5sum_2.outputs.md5sum }} ]] || exit 1

0 comments on commit 5959e43

Please sign in to comment.