-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add GitHub Actions for publishing package and documentation (#6)
* Add GitHub Actions job * Fix docs requirements * Add build requirements * Add basic build action * Add pandoc dependency * Fix spelling of sudo * Test Cache * Ensure wget is cache * Experiement with caching * Move Cache to home directory * Try home dir * Move wget output path * Test cache * Add caching for PySCIPOpt * Fix PySCIPOpt install * Fix PySCIPOpt build path * Test PySCIPOpt cache * Make only one apt-get install * Deploy docs to GitHub pages * Fix typo in CI user email * Allow empty commits for documentation * Create setup-scipoptsuite.zml * Create setup-pyscipopt.yml * Make setup-pyscipopt an action * Make setup-scipoptsuite action * Use custom actions * Checkout repository first * Fix path * Fix inputs * Fix inputs again * Add missing shell * Use shell * Setup scip-8 branch * Quiet download of SCIPOptSuite * Add release workflow * Finish release workflow * Create release-test.yml * Add secret * Update release workflow reference * Fix paths in release * Update release hash * Bump version to 0.1.1 * Rename release testpypi * Create release-production.yml * Create deploy-documentation.yml * Remove doc deploy from default build * Update build-package.yml * Update action.yml * Update deploy-documentation.yml
- Loading branch information
1 parent
97a23ba
commit 35959ec
Showing
7 changed files
with
89 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,49 +19,16 @@ jobs: | |
cache: 'pip' | ||
cache-dependency-path: | | ||
requirements.txt | ||
docs/requirements.txt | ||
- name: Prepare Python Environment | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
- name: Setup PySCIPOpt | ||
uses: ./.github/actions/setup-pyscipopt-action | ||
with: | ||
ref: scip-8 | ||
|
||
- name: Build PyGCGOpt | ||
- name: Build & Install PyGCGOpt | ||
run: | | ||
python -m build --sdist --no-isolation --outdir dist/ | ||
- name: Install PyGCGOpt | ||
run: | | ||
pip install dist/*.tar.gz | ||
- name: Build Documentation | ||
run: make html | ||
working-directory: ./docs | ||
|
||
- name: Checkout Documentation Branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Deploy Documentation | ||
run: | | ||
rm -rf gh-pages/* | ||
cp -r docs/_build/html/* gh-pages/ | ||
cd gh-pages | ||
git config user.name "GCG CI Bot" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit --allow-empty -m "Deploy docs to GitHub Pages, GitHub Actions build: ${GITHUB_RUN_ID}" -m "Commit: ${GITHUB_SHA}" | ||
git push | ||
- name: Archive Documentation | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: sphinx-documentation | ||
path: docs/_build/html | ||
pip install . |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
name: Deploy Documentation | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
Build-Package-Linux: | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- name: Check out repository code | ||
uses: actions/checkout@v2 | ||
|
||
- name: Setup pandoc | ||
run: | | ||
sudo apt-get install -y pandoc | ||
- name: Setup SCIPOptSuite | ||
uses: ./.github/actions/setup-scipoptsuite-action | ||
|
||
- name: Set up Python 3.9 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: '3.9' | ||
cache: 'pip' | ||
cache-dependency-path: | | ||
requirements.txt | ||
docs/requirements.txt | ||
- name: Prepare Python Environment | ||
run: | | ||
pip install -r requirements.txt | ||
pip install -r docs/requirements.txt | ||
- name: Setup PySCIPOpt | ||
uses: ./.github/actions/setup-pyscipopt-action | ||
with: | ||
ref: scip-8 | ||
|
||
- name: Build & Install PyGCGOpt | ||
run: | | ||
pip install . | ||
- name: Build Documentation | ||
run: make html | ||
working-directory: ./docs | ||
|
||
- name: Checkout Documentation Branch | ||
uses: actions/checkout@v2 | ||
with: | ||
ref: gh-pages | ||
path: gh-pages | ||
|
||
- name: Deploy Documentation | ||
run: | | ||
rm -rf gh-pages/* | ||
cp -r docs/_build/html/* gh-pages/ | ||
cd gh-pages | ||
git config user.name "GCG CI Bot" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit --allow-empty -m "Deploy docs to GitHub Pages, GitHub Actions build: ${GITHUB_RUN_ID}" -m "Commit: ${GITHUB_SHA}" | ||
git push | ||
- name: Archive Documentation | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: sphinx-documentation | ||
path: docs/_build/html |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
name: Release Package PyPI | ||
|
||
on: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
release-test: | ||
uses: scipopt/PyGCGOpt/.github/workflows/release.yml@b726a0019e1fb2c27765266adb4d700130e35679 | ||
with: | ||
production: true | ||
secrets: | ||
PYPI_API_TOKEN: ${{ secrets.PYPI_API_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
__version__ = '0.1.0' | ||
__version__ = '0.1.1' | ||
|
||
# required for Python 3.8 on Windows | ||
import os | ||
|