Skip to content

Commit

Permalink
prepare to v0.2.0
Browse files Browse the repository at this point in the history
  • Loading branch information
StardustDL committed Jan 28, 2024
1 parent 0d46d70 commit 33d14ec
Show file tree
Hide file tree
Showing 233 changed files with 3,264 additions and 20,787 deletions.
224 changes: 119 additions & 105 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,69 +21,83 @@ jobs:
- uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: '3.10'
- name: Setup coxbuild
run: pip install coxbuild
python-version: "3.12"
- name: Build
run: |
coxbuild build:web
coxbuild build:package
coxbuild installBuilt
python -m pip install build
python -m build
- name: Upload package artifacts
uses: actions/upload-artifact@v3
with:
name: package
path: ./dist
- name: Prepare
run: |
mkdir cache
python -u -m aexpy initialize
mkdir -p ./cache
- name: Test Preprocess
run: |
python -u -m aexpy -vvv preprocess -r -p generator-oj-problem@0.0.1 ./cache ./cache/distribution1.json
python -u -m aexpy -vvv preprocess -r -p generator-oj-problem@0.0.2 ./cache ./cache/distribution2.json
- name: Test Extraction
continue-on-error: true
run: python -u -m aexpy -vvv extract click@8.1.3
- name: Test Report 1
run: |
python -u -m aexpy -vvv extract ./cache/distribution1.json ./cache/api1.json
python -u -m aexpy -vvv extract ./cache/distribution2.json ./cache/api2.json
- name: Test Difference
continue-on-error: true
run: python -u -m aexpy -vvv report jinja2@3.1.1:3.1.2
- name: Test Report 2
run: python -u -m aexpy -vvv report coxbuild@0.1.5:0.1.6
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: package-cache
path: ./cache
image:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
persist-credentials: false
- uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: 'x64'
- name: Setup coxbuild
run: pip install coxbuild
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Build
run: |
docker build -t aexpy/aexpy .
mkdir cache
docker run aexpy/aexpy --help
- name: Test Extraction
run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv extract click@8.1.3
- name: Test Report 1
run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv report jinja2@3.1.1:3.1.2
- name: Test Report 2
run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv report coxbuild@0.1.5:0.1.6
python -u -m aexpy -vvv diff ./cache/api1.json ./cache/api1.json ./cache/diff.json
- name: Test Report
continue-on-error: true
run: |
python -u -m aexpy -vvv report ./cache/diff.json ./cache/report.json
- name: Test View
continue-on-error: true
run: |
python -u -m aexpy -vvv view ./cache/distribution1.json
python -u -m aexpy -vvv view ./cache/distribution2.json
python -u -m aexpy -vvv view ./cache/api1.json
python -u -m aexpy -vvv view ./cache/api2.json
python -u -m aexpy -vvv view ./cache/diff.json
python -u -m aexpy -vvv view ./cache/report.json
- name: Upload results
uses: actions/upload-artifact@v3
with:
name: image-cache
name: package-cache
path: ./cache
# image:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# with:
# persist-credentials: false
# - uses: actions/setup-python@v4
# with:
# python-version: '3.12'
# architecture: 'x64'
# - name: Setup coxbuild
# run: pip install coxbuild
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Build
# run: |
# docker build -t aexpy/aexpy .
# mkdir cache
# docker run aexpy/aexpy --help
# - name: Test Extraction
# run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv extract click@8.1.3
# - name: Test Report 1
# run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv report jinja2@3.1.1:3.1.2
# - name: Test Report 2
# run: docker run -v ${{ github.workspace }}/cache:/data aexpy/aexpy -vvv report coxbuild@0.1.5:0.1.6
# - name: Upload results
# uses: actions/upload-artifact@v3
# with:
# name: image-cache
# path: ./cache
docs:
runs-on: ubuntu-latest
steps:
Expand All @@ -93,7 +107,7 @@ jobs:
persist-credentials: false
- uses: actions/setup-python@v4
with:
python-version: '3.7'
python-version: '3.12'
architecture: 'x64'
- name: Setup paperead
run: pip install paperead
Expand All @@ -106,61 +120,61 @@ jobs:
with:
name: docs
path: ./docs/dist
deploy:
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'release' }}
needs: [image, docs, package]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
with:
name: docs
path: ./docs/dist
- name: Deploy docs to netlify
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
with:
args: deploy --dir=./docs/dist --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
- name: Download package artifacts
uses: actions/download-artifact@v3
with:
name: package
path: ./dist
- name: Deploy packages
if: ${{ github.event_name == 'release' }}
env:
PYTHONUTF8: 1
TWINE_USERNAME: '__token__'
TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
run: |
python -m pip install --upgrade build twine
python -m twine upload --skip-existing --repository pypi "dist/*"
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
- name: Login to DockerHub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}
- name: Image Metadata
id: meta
uses: docker/metadata-action@v4
with:
images: stardustdl/aexpy
- name: Set BUILD_DATE
run: echo "BUILD_DATE=$(date -Ins)" >> $GITHUB_ENV
- name: Deploy image
uses: docker/build-push-action@v3
with:
push: ${{ github.event_name == 'push' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
GIT_COMMIT=${{ github.sha }}
BUILD_DATE=${{ env.BUILD_DATE }}
# deploy:
# if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' || github.event_name == 'release' }}
# needs: [image, docs, package]
# runs-on: ubuntu-latest
# steps:
# - name: Download artifacts
# uses: actions/download-artifact@v3
# with:
# name: docs
# path: ./docs/dist
# - name: Deploy docs to netlify
# if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }}
# uses: netlify/actions/cli@master
# env:
# NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
# with:
# args: deploy --dir=./docs/dist --prod
# secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
# - name: Download package artifacts
# uses: actions/download-artifact@v3
# with:
# name: package
# path: ./dist
# - name: Deploy packages
# if: ${{ github.event_name == 'release' }}
# env:
# PYTHONUTF8: 1
# TWINE_USERNAME: '__token__'
# TWINE_PASSWORD: ${{ secrets.PYPI_TOKEN }}
# run: |
# python -m pip install --upgrade build twine
# python -m twine upload --skip-existing --repository pypi "dist/*"
# - name: Set up QEMU
# uses: docker/setup-qemu-action@v2
# - name: Set up Docker Buildx
# uses: docker/setup-buildx-action@v2
# - name: Login to DockerHub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USERNAME }}
# password: ${{ secrets.DOCKERHUB_TOKEN }}
# - name: Image Metadata
# id: meta
# uses: docker/metadata-action@v4
# with:
# images: stardustdl/aexpy
# - name: Set BUILD_DATE
# run: echo "BUILD_DATE=$(date -Ins)" >> $GITHUB_ENV
# - name: Deploy image
# uses: docker/build-push-action@v3
# with:
# push: ${{ github.event_name == 'push' }}
# tags: ${{ steps.meta.outputs.tags }}
# labels: ${{ steps.meta.outputs.labels }}
# build-args: |
# GIT_COMMIT=${{ github.sha }}
# BUILD_DATE=${{ env.BUILD_DATE }}
Loading

0 comments on commit 33d14ec

Please sign in to comment.