From f621639094d17fb79f50a6129f87dfa0b760eada Mon Sep 17 00:00:00 2001 From: "H. L. Nourse" <32994022+thenoursehorse@users.noreply.github.com> Date: Fri, 27 Oct 2023 15:32:03 +0900 Subject: [PATCH] fix: versioning (#34) * fix(docker): copy hidden folders in source tree * fix(docker): ignore files * fix(cd): factor out version bump --- .dockerignore | 20 +++++++++++++------- .github/workflows/cd.yml | 18 +++++++++++++++--- .gitignore | 6 +++--- docker/Dockerfile.dev | 6 +++--- 4 files changed, 34 insertions(+), 16 deletions(-) diff --git a/.dockerignore b/.dockerignore index da732a0..be9e812 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,12 +1,18 @@ -.travis.yml -Dockerfile -Jenkinsfile -.git/objects/pack -build* -_build* - # Byte-compiled / optimized / DLL files __pycache__/ *.py[cod] *$py.class +*egg-info + +# From nox build +build +_build +.nox + +# docker files +docker/ +docker-compose* +Dockerfile* +# git files +.git/objects/pack \ No newline at end of file diff --git a/.github/workflows/cd.yml b/.github/workflows/cd.yml index ced0215..3a3aee1 100644 --- a/.github/workflows/cd.yml +++ b/.github/workflows/cd.yml @@ -8,14 +8,17 @@ on: jobs: - build: - runs-on: ubuntu-22.04 + bump-version: + runs-on: ubuntu-latest permissions: + id-token: write contents: write steps: - uses: actions/checkout@v4 - + with: + fetch-depth: 0 + - name: Bump version and push tag id: tag_version uses: mathieudutour/github-tag-action@v6.1 @@ -29,6 +32,15 @@ jobs: name: Release ${{ steps.tag_version.outputs.new_tag }} body: ${{ steps.tag_version.outputs.changelog }} + build: + needs: [bump-version] + runs-on: ubuntu-22.04 + + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 0 + - name: Setup Python 3.10 and TRIQS uses: ./.github/actions/setup-triqs with: diff --git a/.gitignore b/.gitignore index 9fd4950..8700ad5 100644 --- a/.gitignore +++ b/.gitignore @@ -2,18 +2,18 @@ __pycache__/ *.py[cod] *$py.class - *egg-info -# From nox +# From nox build build _build .nox -# From pytest +# pytest .pytest_cache # Potential auth keys .github.auth +# Visual Studio Code .vscode \ No newline at end of file diff --git a/docker/Dockerfile.dev b/docker/Dockerfile.dev index 9689b77..3869973 100644 --- a/docker/Dockerfile.dev +++ b/docker/Dockerfile.dev @@ -79,13 +79,13 @@ FROM build_arm64 # Install any other software we need RUN pip install --upgrade pip \ - && pip install nox matplotlib -#mypy + && pip install matplotlib +# nox mypy # Install library WORKDIR $BUILD/$APPNAME COPY . $SRC/$APPNAME -RUN cp -as $SRC/$APPNAME/* . +RUN cp -asT $SRC/$APPNAME/ . RUN pip install -e .[test,docs] # Build documentation