forked from mila-iqia/milabench
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
121 additions
and
492 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
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,105 @@ | ||
name: tests | ||
|
||
on: | ||
# Runs for pull requests | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
tests: | ||
strategy: | ||
fail-fast: true | ||
matrix: | ||
include: | ||
- arch: cpu | ||
exclude: "no-cuda" | ||
run_on: ec2 | ||
# - arch: rocm | ||
# exclude : "no-rocm" | ||
|
||
runs-on: ubuntu-latest | ||
environment: test-cloud-ci | ||
|
||
# Cancel previous jobs if a new version was pushed | ||
concurrency: | ||
group: "${{ github.ref }}-${{ matrix.arch }}-${{ matrix.run_on }}" | ||
cancel-in-progress: true | ||
|
||
defaults: | ||
run: | ||
shell: bash -el {0} | ||
|
||
env: | ||
MILABENCH_CONFIG: "config/test.yaml" | ||
MILABENCH_SYSTEM: "config/examples/${{ matrix.run_on }}-system.yaml" | ||
MILABENCH_BASE: "output" | ||
MILABENCH_ARGS: "" | ||
MILABENCH_GPU_ARCH: "${{ matrix.arch }}" | ||
MILABENCH_DASH: "no" | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.9 | ||
|
||
- name: dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U poetry | ||
poetry lock --no-update | ||
poetry install | ||
- name: cloud | ||
run: | | ||
mkdir -p ~/.aws | ||
mkdir -p ~/.ssh/covalent | ||
echo "${{ secrets.COVALENT_EC2_EXECUTOR_KEYPAIR }}" >~/.ssh/covalent/covalent-ec2-executor-keypair.pem | ||
echo "[default]" >~/.aws/credentials | ||
echo "aws_access_key_id=${{ secrets.AWS_ACCESS_KEY_ID }}" >>~/.aws/credentials | ||
echo "aws_secret_access_key=${{ secrets.AWS_SECRET_ACCESS_KEY }}" >>~/.aws/credentials | ||
# export AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }} | ||
# export AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }} | ||
chmod a-rwx,u+rwX ~/.aws ~/.ssh | ||
ls -lR ~/.aws ~/.ssh | ||
cat ~/.aws/credentials | ||
_system=$( | ||
poetry run milabench cloud \ | ||
--setup \ | ||
--run-on ${{ matrix.run_on }} | ||
) | ||
{ read _hash ; }< <( | ||
echo -n "$_system" | while read l | ||
do | ||
if [[ "$l" == "# hash::>"* ]] | ||
then | ||
echo -n "${l#*::>}" | ||
fi | ||
done | ||
) | ||
if [[ -z "${_hash}" ]] | ||
then | ||
>&2 echo "Failed to fetch system config hash" | ||
exit 1 | ||
fi | ||
echo -n "$_system" >$MILABENCH_SYSTEM.$_hash | ||
export MILABENCH_SYSTEM=$MILABENCH_SYSTEM.$_hash | ||
- name: install benchmarks | ||
run: | | ||
milabench install | ||
- name: prepare benchmarks | ||
run: | | ||
milabench prepare | ||
- name: run benchmarks | ||
run: | | ||
milabench run | ||
- name: Summary | ||
run: | | ||
milabench report --push |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.