Skip to content

Commit

Permalink
Update on "github actions"
Browse files Browse the repository at this point in the history
[ghstack-poisoned]
  • Loading branch information
bottler committed Nov 27, 2024
1 parent 37f2151 commit f9045ac
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 39 deletions.
7 changes: 7 additions & 0 deletions .github/check-yaml.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
import pathlib
import yaml

for path in pathlib.Path(".").glob("**/*.yml"):
print(path)
with open(path) as f:
yaml.load(f, Loader=yaml.FullLoader)
39 changes: 11 additions & 28 deletions .github/workflows/every_commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,34 +64,17 @@ jobs:
#pip install --progress-bar off --use-deprecated=legacy-resolver repo/nevergrad-build/dist/nevergrad-*any.whl
echo "Installed wheel"
python -c "from nevergrad import functions;f = functions.ArtificialFunction(name='sphere', block_dimension=2);f([2, 3])"
# - uses: actions/[email protected]
# with:
# path: nevergrad-build/dist
# - name: Build docs
# run: |
# . venv/bin/activate
# cd docs/
# make html
# - uses: actions/[email protected]
# with:
# path: docs/_build/html
# - name: Deploy documentation IF main
# uses: peaceiris/actions-gh-pages@v3
# with:
# github_token: ${{ secrets.GITHUB_TOKEN }}
# publish_dir: docs/build/html
# if: github.event_name != 'pull_request'
- name: Build docs
run: |
. venv/bin/activate
cd docs/
make html
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/
if: github.event_name != 'pull_request'
- name: Build docs
run: |
. venv/bin/activate
cd docs/
make html
- name: Upload static files as artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: docs/_build/html/
if: github.event_name != 'pull_request'
deploy-docs:
environment:
name: github-pages
Expand Down
19 changes: 8 additions & 11 deletions .github/workflows/version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,15 @@ jobs:
mv dist nevergrad-build/
- name: Create .pypirc
run: |
if [[ $GITHUB_REF =~ ^refs/tags//(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)\.(0|[1-9][0-9]*)(\.post(0|[1-9][0-9]*))?/$ && $GITHUB_REF != 'refs/heads//.*/' ]]; then
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
fi
echo -e "[pypi]" >> ~/.pypirc
echo -e "username = __token__" >> ~/.pypirc
echo -e "password = $PYPI_PASSWORD" >> ~/.pypirc
- name: Verify tag
run: python setup.py verify_circleci_version
- name: upload to pypi
run: |
echo "Deploying"
. venv/bin/activate
du -h nevergrad-build/dist/*
twine check nevergrad-build/dist/nevergrad-*
twine upload nevergrad-build/dist/nevergrad-* --verbose
fi
echo "Deploying"
. venv/bin/activate
du -h nevergrad-build/dist/*
twine check nevergrad-build/dist/nevergrad-*
twine upload nevergrad-build/dist/nevergrad-* --verbose

0 comments on commit f9045ac

Please sign in to comment.