From c70a0a53085841254ec32d04b056adb9bc20030a Mon Sep 17 00:00:00 2001 From: Luca Peric Date: Sat, 23 Mar 2024 12:29:10 +0000 Subject: [PATCH 1/4] Adding poetry build matrix test --- .github/workflows/build.yml | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 .github/workflows/build.yml diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml new file mode 100644 index 0000000..c97e692 --- /dev/null +++ b/.github/workflows/build.yml @@ -0,0 +1,34 @@ +name: Poetry Install Matrix + +on: + push: + branches: '**' + # pull_request: + # branches: [ main ] + +jobs: + build: + runs-on: ubuntu-latest + strategy: + matrix: + python-version: [3.10, 3.11] + + steps: + - uses: actions/checkout@v2 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v2 + with: + python-version: ${{ matrix.python-version }} + + - name: Install Poetry + run: | + curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - + + - name: Configure Poetry + run: | + echo "$HOME/.poetry/bin" >> $GITHUB_PATH + poetry config virtualenvs.in-project true + - name: Install dependencies + run: | + poetry install && poetry run pip install torch==2.2.1 torchaudio==2.2.1 From 1c68487c7f5c0fa719b9e4ab0918e6a432d536ff Mon Sep 17 00:00:00 2001 From: Luca Peric Date: Sat, 23 Mar 2024 12:33:06 +0000 Subject: [PATCH 2/4] Using action from library --- .github/workflows/build.yml | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index c97e692..b14a7ff 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -11,24 +11,17 @@ jobs: runs-on: ubuntu-latest strategy: matrix: - python-version: [3.10, 3.11] + python-version: ["3.10", "3.11"] steps: - - uses: actions/checkout@v2 - - - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + - name: Setup + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} + - uses: Gr1N/setup-poetry@v8 + - run: poetry --version - - name: Install Poetry - run: | - curl -sSL https://raw.githubusercontent.com/python-poetry/poetry/master/get-poetry.py | python - - - - name: Configure Poetry - run: | - echo "$HOME/.poetry/bin" >> $GITHUB_PATH - poetry config virtualenvs.in-project true - name: Install dependencies run: | poetry install && poetry run pip install torch==2.2.1 torchaudio==2.2.1 From f9ebb557f7fcba42f70747fb1eeb1d2af7a8c48d Mon Sep 17 00:00:00 2001 From: Luca Peric Date: Sat, 23 Mar 2024 12:34:38 +0000 Subject: [PATCH 3/4] Adding names --- .github/workflows/build.yml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index b14a7ff..5cb7866 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -14,14 +14,18 @@ jobs: python-version: ["3.10", "3.11"] steps: - - name: Setup - - uses: actions/checkout@v3 - - uses: actions/setup-python@v4 + - name: Checkout + uses: actions/checkout@v3 + + - name: Set up Python ${{ matrix.python-version }} + uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: Gr1N/setup-poetry@v8 - - run: poetry --version + + - name: Install Poetry + uses: Gr1N/setup-poetry@v8 - name: Install dependencies run: | + poetry --version poetry install && poetry run pip install torch==2.2.1 torchaudio==2.2.1 From 34cf96a7be19d5f43b47b407346f29610289392f Mon Sep 17 00:00:00 2001 From: Luca Peric Date: Sat, 23 Mar 2024 12:37:30 +0000 Subject: [PATCH 4/4] Adding branch qualifiers to poetry build jobs --- .github/workflows/build.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5cb7866..115c649 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -2,9 +2,9 @@ name: Poetry Install Matrix on: push: - branches: '**' - # pull_request: - # branches: [ main ] + branches: [ main ] + pull_request: + branches: [ main ] jobs: build: