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: Python Continuous Integration | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
env: | |
PYTHON_VERSION: 3.11 | |
AZURE_RESOURCE_GROUP_NAME: "azure-ml-gui" | |
AZURE_LOCATION: "northeurope" | |
AZURE_ML_WORKSPACE_NAME: "cats-dogs-gui" | |
AZURE_WEBAPP_NAME: "cats-dogs-gui" | |
permissions: | |
id-token: write | |
contents: write | |
packages: write | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Python ${{ env.PYTHON_VERSION }} | |
uses: actions/setup-python@v3 | |
with: | |
python-version: ${{ env.PYTHON_VERSION }} | |
- name: Install Poetry dependencies | |
run: | | |
python -m pip install --upgrade pip | |
pip install --user poetry | |
- name: Add LLVM 10 repository | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y software-properties-common | |
sudo add-apt-repository "deb http://apt.llvm.org/focal/ llvm-toolchain-focal-10 main" | |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add - | |
- name: Install LLVM 10 | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y llvm-10 clang-10 | |
- name: Verify LLVM 10 version | |
run: | | |
llvm-config-10 --version | |
clang-10 --version | |
- name: Set LLVM_CONFIG environment variable | |
run: echo "LLVM_CONFIG=/usr/bin/llvm-config-10" >> $GITHUB_ENV | |
- name: Install dependencies | |
working-directory: production/api | |
run: | | |
sudo apt-get install llvm-10 | |
python -m pip wheel --no-cache-dir --use-pep517 "llvmlite (==0.34.0)" | |
poetry install |