diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 1025283..0000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,69 +0,0 @@ ---- -common-steps: - - - &installdeps - run: - name: Install Debian packaging dependencies - command: | - apt-get update && apt-get install -y make sudo - make install-deps - - - &installtestdeps - run: - name: Install test dependencies - command: | - apt-get install reprotest faketime -y --no-install-recommends - .venv/bin/pip install -r test-requirements.txt - - -version: 2.1 - -jobs: - lint-and-test: - docker: - - image: debian:bullseye - steps: - - checkout - - *installdeps - - *installtestdeps - - run: - name: install test requirements, run linters, and run tests - command: | - source .venv/bin/activate - sed -i -re "292s/^(\s+).*\$/\1return _.prepend_to_build_command_raw('')/" /usr/lib/python3/dist-packages/reprotest/build.py - make test - - reprotest-wheels: - docker: - - image: debian:bullseye - # Our "ci" user will have problems if the repository is in /root - working_directory: "/srv" - steps: - - checkout - - *installdeps - - *installtestdeps - - run: - name: install test requirements and run tests - command: | - adduser --system ci --ingroup root - sed -i -re "292s/^(\s+).*\$/\1return _.prepend_to_build_command_raw('')/" /usr/lib/python3/dist-packages/reprotest/build.py - # Have our "ci" user take over the git repo - chown ci:root -R . - sudo -u ci bash -c "source .venv/bin/activate && pytest -vvs tests/test_reproducible_wheels.py" - -workflows: - builder_ci: - jobs: - - lint-and-test - - reprotest-wheels - - nightly: - triggers: - - schedule: - cron: "0 6 * * *" - filters: - branches: - only: - - main - jobs: - - reprotest-wheels diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cba9abb..2e748fa 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -8,11 +8,22 @@ jobs: runs-on: ubuntu-latest container: debian:bullseye steps: + - name: Bootstrap Debian system package dependencies + run: | + apt-get update && apt-get install --yes --no-install-recommends make sudo git git-lfs ca-certificates - uses: actions/checkout@v4 - - name: Install dependencies + with: + lfs: true + - name: Install additional packages and Python dependencies + run: | + # Installs Python & bootstrap wheels, and initializes a virtualenv at .venv + make install-deps + ./.venv/bin/pip install -r test-requirements.txt + - name: Run linters run: | - apt-get update && apt-get install --yes --no-install-recommends make python3-pip - pip install -r test-requirements.txt - - name: Run lint checks + . ./.venv/bin/activate + make lint + - name: Run tests except reprotest run: | - make lint \ No newline at end of file + . ./.venv/bin/activate + make test \ No newline at end of file diff --git a/.github/workflows/reprotest.yml b/.github/workflows/reprotest.yml new file mode 100644 index 0000000..0cbf967 --- /dev/null +++ b/.github/workflows/reprotest.yml @@ -0,0 +1,33 @@ +--- +name: CI + +on: + push: + pull_request: + schedule: + - cron: "0 6 * * *" + +jobs: + reprotest: + runs-on: ubuntu-latest + container: debian:bullseye + steps: + - name: Bootstrap Debian system package dependencies + run: | + apt-get update && apt-get install --yes --no-install-recommends make sudo git git-lfs ca-certificates + - uses: actions/checkout@v4 + with: + lfs: true + - name: Install additional packages and Python dependencies + run: | + # Installs Python & bootstrap wheels, and initializes a virtualenv at .venv + make install-deps + ./.venv/bin/pip install -r test-requirements.txt + - name: Test wheel reproducibility + run: | + # Necessary to enable git operations without permission issues + git config --global --add safe.directory "*" + # Necessary to run checks as non-root user, to avoid reproducibility issues + adduser --system ci --ingroup root + chown ci:root -R . + sudo -u ci bash -c "source .venv/bin/activate && pytest -vvs tests/test_reproducible_wheels.py" \ No newline at end of file