-
Notifications
You must be signed in to change notification settings - Fork 32
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update GitHub Actions for new packaging
This also separates the workflows into reusable ones to prevent code duplication.
- Loading branch information
1 parent
8ac3da3
commit 6beb19b
Showing
11 changed files
with
264 additions
and
268 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
name: Build | ||
|
||
on: | ||
workflow_call | ||
|
||
jobs: | ||
build_wheel: | ||
name: Wheel | ||
runs-on: ubuntu-latest | ||
outputs: | ||
wheel_file: ${{ steps.get_wheel_name.outputs.paths }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.7 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.7 | ||
|
||
- name: Upgrade pip and other packaging tools | ||
run: python3 -m pip install --upgrade pip setuptools wheel build twine | ||
|
||
- name: Build the `galois` package | ||
run: python3 -m build | ||
|
||
- name: Verify the wheel file | ||
run: python3 -m twine check dist/* | ||
|
||
- name: Upload artifacts | ||
uses: actions/upload-artifact@v2 | ||
with: | ||
name: dist | ||
path: dist/ | ||
retention-days: 1 |
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,32 +1,25 @@ | ||
name: Docs | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - master | ||
pull_request: | ||
branches: | ||
- master | ||
workflow_call | ||
|
||
jobs: | ||
build: | ||
name: Build | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
- name: Set up Python 3.8 | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Install documentation dependencies | ||
run: | | ||
python3 -m pip install --upgrade pip | ||
python3 -m pip install -r docs/requirements.txt | ||
- name: Upgrade pip | ||
run: python3 -m pip install --upgrade pip | ||
|
||
- name: Install Python package | ||
run: python3 -m pip install . | ||
- name: Install the `galois` package with [doc] | ||
run: python3 -m pip install .[doc] | ||
|
||
- name: Run Sphinx to build docs | ||
run: sphinx-build -b dirhtml -v docs/ docs/build/ | ||
- name: Run Sphinx to build docs | ||
run: sphinx-build -b dirhtml -v docs/ docs/build/ |
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,28 @@ | ||
name: Lint | ||
|
||
on: | ||
workflow_call | ||
|
||
jobs: | ||
run-linter: | ||
name: Run | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
python-version: [3.7, 3.8, 3.9, '3.10'] | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Upgrade pip | ||
run: python3 -m pip install --upgrade pip | ||
|
||
- name: Install the `galois` package with [dev] | ||
run: python3 -m pip install .[dev] | ||
|
||
- name: Lint with pylint | ||
run: python3 -m pylint src/galois/ |
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,23 @@ | ||
name: Pull Request | ||
|
||
on: | ||
# push: | ||
# branches: | ||
# - master | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/build.yml | ||
|
||
lint: | ||
uses: ./.github/workflows/lint.yml | ||
|
||
docs: | ||
uses: ./.github/workflows/docs.yml | ||
|
||
test: | ||
uses: ./.github/workflows/test.yml | ||
needs: build |
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
Oops, something went wrong.