[infra] Upgrade PyTorch to latest nightly version #226
Workflow file for this run
This file contains hidden or 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: Check PR | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| - rel/* | |
| jobs: | |
| check-commit-message: | |
| name: Check commit message | |
| runs-on: ubuntu-22.04 | |
| # Skip on draft, check on draft -> ready | |
| if: github.repository_owner == 'Samsung' && github.event.pull_request.draft == false | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| # Checkout PR head commit | |
| # Checkout Action use merge commit as default | |
| ref: ${{ github.event.pull_request.head.sha }} | |
| # Fetch all history and branch (default: 1) | |
| fetch-depth: 0 | |
| - name: "Check signed-off" | |
| run: | | |
| # Get commit body | |
| git log origin/"$GITHUB_BASE_REF"..HEAD --format=%b > commit_msg.txt | |
| sed "/^$/d" commit_msg.txt > commit_body.txt | |
| # Check string starting from "TICO-DCO-1.0-Signed-off-by:" | |
| count="$(grep -c "TICO-DCO-1.0-Signed-off-by:" commit_body.txt)" | |
| if [[ ! "$count" -ge "1" ]]; then | |
| echo "Your commit message does not contain the expected signoff information." | |
| echo "Please add a line like 'TICO-DCO-1.0-Signed-off-by: <NAME> <<EMAIL>>' to your commit message." | |
| echo "Refer to https://github.com/Samsung/TICO/wiki/TICO-Developer-Certificate-of-Origin" | |
| exit 1 | |
| fi | |
| echo "TICO-DCO-1.0-Signed-off-by is OK" | |
| check-style: | |
| runs-on: ubuntu-22.04 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.x' | |
| - name: "Run configure" | |
| run: | | |
| ./ccex configure format | |
| - name: "Run linters" | |
| run: | | |
| ./ccex format --no-apply-patches | |
| build-and-test: | |
| runs-on: tico-linux | |
| container: | |
| image: samsungonedev.azurecr.io/ubuntu:22.04 | |
| strategy: | |
| matrix: | |
| torch-version: ["2.5", "2.6", "nightly"] # TODO: Add 2.7 when it is released | |
| steps: | |
| - name: Install dependencies | |
| run: | | |
| apt-get update | |
| apt-get install -y curl git lsb-release unzip | |
| - uses: actions/checkout@v4 | |
| - name: Install python dependencies | |
| run: | | |
| apt-get install -y python3-venv python3-pip | |
| - name: Get Ubuntu codename | |
| id: os | |
| run: | | |
| CODENAME=$(lsb_release -cs) | |
| echo "codename=$CODENAME" >> "$GITHUB_OUTPUT" | |
| # TODO Enable this step after one-compiler 1.30.0 release. | |
| # - name: Download one-compiler package | |
| # id: download | |
| # uses: ./.github/actions/download-release-asset | |
| # with: | |
| # owner: Samsung | |
| # repo: ONE | |
| # tag: 1.30.0 | |
| # filename: one-compiler-${{ steps.os.outputs.codename }}_1.30.0_amd64.deb | |
| # - name: "Install one-compiler" | |
| # run: | | |
| # dpkg -i ${{ steps.download.outputs.filename }} | |
| # apt-get install -f -y | |
| # onecc --version | |
| - name: Download issue attatchment (one-compiler latest) | |
| run: | | |
| curl -L -o one-compiler-latest.zip \ | |
| "https://github.com/user-attachments/files/19561702/one-compiler_1.30.0.25040116_amd64.zip" | |
| - name: Unzip and install the one-compiler package | |
| run: | | |
| unzip one-compiler-latest.zip -d one-compiler-package | |
| ls -l one-compiler-package | |
| dpkg -i one-compiler-package/*.deb | |
| apt-get install -f -y # fix dependencies if needed | |
| - name: Check installation | |
| run: | | |
| onecc --version || echo "Installation failed." | |
| - name: "Build package" | |
| run: | | |
| pip install setuptools | |
| ./ccex build | |
| - name: "Run install" | |
| shell: bash | |
| run: | | |
| TORCH_VERSION=${{ matrix.torch-version }} | |
| ./ccex install --dist --torch_ver $TORCH_VERSION | |
| pt2-to-circle -h | |
| - name: "Configure test" | |
| shell: bash | |
| run: | | |
| TORCH_VERSION=${{ matrix.torch-version }} | |
| ./ccex configure test --torch_ver $TORCH_VERSION | |
| - name: "Show torch package versions" | |
| shell: bash | |
| run: | | |
| pip list | grep torch | |
| - name: "Run test" | |
| shell: bash | |
| run: | | |
| ./ccex test | |
| - name: "Upload artifact" | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: "wheel-${{ matrix.torch-version }}" | |
| path: "./dist/" |