Skip to content

Build ./dtox.sh Cache Image #8

Build ./dtox.sh Cache Image

Build ./dtox.sh Cache Image #8

name: Build ./dtox.sh Cache Image
on:
schedule:
# 2:00 AM US-Pacific on Wednesdays
- cron: '0 9 * * 3'
workflow_dispatch:
defaults:
run:
shell: bash
env:
SCIENCE_AUTH_API_GITHUB_COM_BEARER: ${{ secrets.GITHUB_TOKEN }}
jobs:
build-cache-images:
name: Build ./dtox.sh Cache for ${{ matrix.tox-env }}
runs-on: ubuntu-24.04
strategy:
matrix:
include:
# TODO(John Sirois): Automate syncing these with ci.yml or else automate a sync check.
- tox-env: py27-pip20
- tox-env: py313-pip25_0_1
- tox-env: pypy310-pip24_3_1
- tox-env: py27-pip20-integration
- tox-env: py38-pip22_3_1-integration
- tox-env: py313-pip25_0_1-integration
- tox-env: py314-pip25_0_1-integration
- tox-env: pypy310-pip24_3_1-integration
steps:
- name: Checkout Pex
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- name: Build & Export Cache Image for ${{ matrix.tox-env }}
run: |
python -mvenv .venv
source .venv/bin/activate
python -V
pip install -U pip
pip -V
pip install tox
tox --version
tox -e build-cache-image -- \
--color \
--build-style build \
--dist-dir export \
--post-action export \
--tox-env ${{ matrix.tox-env }}
- uses: actions/upload-artifact@v4
with:
path: |
export/*.tar
.gitignore
name: 'cache-${{ matrix.tox-env }}'
build-cache-image:
name: Merge and push unified ./dtox.sh Cache Image
runs-on: ubuntu-24.04
needs: build-cache-images
steps:
- name: Checkout Pex
uses: actions/checkout@v4
- name: Setup Python 3.11
uses: actions/setup-python@v5
with:
python-version: "3.11"
- uses: actions/download-artifact@v4
with:
merge-multiple: true
- name: Merge & Push Cache Image
run: |
python -mvenv .venv
source .venv/bin/activate
python -V
pip install -U pip
pip -V
pip install tox
tox --version
echo "${{ secrets.GITHUB_TOKEN }}" | \
docker login ghcr.io -u ${{ github.actor }} --password-stdin
tox -e build-cache-image -- \
--color \
--build-style merge \
--dist-dir export \
--post-action push