-
-
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.
ENH: Test Execution for Google Collab (#177)
* ENH: Test Execution for Google Collab * remove conda list * increase hdd * increase hdd=250GB * install build tools * update name of action * remove pip invalid options * update software for pip install * add version control over build infra * tmp: disable build cache for full execution check * re-enable build cache
- Loading branch information
Showing
1 changed file
with
76 additions
and
0 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,76 @@ | ||
name: Build Project on Google Collab (Execution) | ||
on: [pull_request] | ||
jobs: | ||
deploy-runner: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: iterative/setup-cml@v2 | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Deploy runner on EC2 | ||
env: | ||
REPO_TOKEN: ${{ secrets.QUANTECON_SERVICES_PAT }} | ||
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | ||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
run: | | ||
cml runner launch \ | ||
--cloud=aws \ | ||
--cloud-region=us-west-2 \ | ||
--cloud-type=p3.2xlarge \ | ||
--labels=cml-gpu \ | ||
--cloud-hdd-size=250 | ||
execution-checks: | ||
needs: deploy-runner | ||
runs-on: [self-hosted, cml-gpu] | ||
container: | ||
image: docker://us-docker.pkg.dev/colab-images/public/runtime | ||
options: --gpus all | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
ref: ${{ github.event.pull_request.head.sha }} | ||
- name: Check nvidia drivers | ||
shell: bash -l {0} | ||
run: | | ||
nvidia-smi | ||
- name: Check python version | ||
shell: bash -l {0} | ||
run: | | ||
python --version | ||
- name: Display Pip Versions | ||
shell: bash -l {0} | ||
run: pip list | ||
- name: Download "build" folder (cache) | ||
uses: dawidd6/action-download-artifact@v3 | ||
with: | ||
workflow: cache.yml | ||
branch: main | ||
name: build-cache | ||
path: _build | ||
# Install build software | ||
- name: Install Build Software | ||
shell: bash -l {0} | ||
run: | | ||
pip install jupyter-book==0.15.1 docutils==0.17.1 quantecon-book-theme==0.7.1 sphinx-tojupyter==0.3.0 sphinxext-rediraffe==0.2.7 sphinx-exercise==0.4.1 sphinxcontrib-youtube==1.1.0 sphinx-togglebutton==0.3.1 arviz==0.13.0 | ||
# Build of HTML (Execution Testing) | ||
- name: Build HTML | ||
shell: bash -l {0} | ||
run: | | ||
jb build lectures --path-output ./ -n -W --keep-going | ||
- name: Upload Execution Reports | ||
uses: actions/upload-artifact@v4 | ||
if: failure() | ||
with: | ||
name: execution-reports | ||
path: _build/html/reports | ||
- name: Preview Deploy to Netlify | ||
uses: nwtgck/actions-netlify@v2 | ||
with: | ||
publish-dir: '_build/html/' | ||
production-branch: main | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
deploy-message: "Preview Deploy from GitHub Actions" | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |