Prot branch #92
Workflow file for this run
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
name: Run unittests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
jobs: | |
test: | |
name: Test | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: '3.10' | |
- name: Set up Conda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
auto-update-conda: true | |
- name: Create Conda Environment | |
shell: bash -l {0} | |
run: | | |
conda create --name cl11.7 python=3.10 | |
conda activate cl11.7 | |
# conda install pytorch=2.0.1 pytorch-cuda=11.7 -c pytorch -c nvidia --solver libmamba | |
# conda install -c conda-forge cudatoolkit-dev==11.7 --solver libmamba | |
# nvcc --version | |
# pip3 install packaging | |
# pip3 install ninja | |
# pip3 install flash-attn --no-build-isolation | |
# pip3 install --upgrade datasets # the latest version is installed | |
# pip3 install transformers==4.31.0 | |
# pip3 install accelerate==0.21.0 | |
# pip3 install aim==3.17.5 | |
pip3 install pyyaml | |
- name: Check git status | |
shell: bash -l {0} | |
run: | | |
if git status &> /dev/null; then | |
echo "In a Git repository." | |
git status | |
else | |
echo "Not in a Git repository." | |
exit 1 # You can fail the workflow if not in a Git repository | |
fi | |
- name: Setup Environment (PR) | |
if: ${{ github.event_name == 'pull_request' }} | |
shell: bash | |
run: | | |
echo "LAST_COMMIT_SHA=${{ github.event.pull_request.head.sha }}" >> ${GITHUB_ENV} | |
- name: Setup Environment (Push) | |
if: ${{ github.event_name == 'push' }} | |
shell: bash | |
run: | | |
echo "LAST_COMMIT_SHA=${GITHUB_SHA}" >> ${GITHUB_ENV} | |
- name: Run unittests | |
shell: bash -l {0} | |
run: | | |
conda activate cl11.7 | |
python3 confirm_tests.py --confirm |