diff --git a/.github/workflows/conda.yaml b/.github/workflows/conda.yaml deleted file mode 100644 index 983283a..0000000 --- a/.github/workflows/conda.yaml +++ /dev/null @@ -1,48 +0,0 @@ -name: condatest -on: - push: - paths: - - 'envs/conda_env.yaml' - - '.github/workflows/conda.yaml' - -jobs: - create-env: - name: Testing conda env (${{ matrix.python-version }}, ${{ matrix.os }}) - runs-on: ${{ matrix.os }} - strategy: - fail-fast: false - matrix: - os: ["ubuntu-latest"] - python-version: ["3.10"] - defaults: - run: - shell: bash -l {0} - - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Create environment with conda - uses: conda-incubator/setup-miniconda@v3 - with: - activate-environment: anaconda-client-env - miniconda-version: "latest" - environment-file: envs/conda_env.yaml - auto-activate-base: false - - - name: Check conda - run: | - conda info - conda list - - - name: Add Tulip - run: pip install tulip - - - name: Add Gurobipy - run: pip install gurobipy - - - name : Install Package for Testing - run : conda install pytest - - - name : Run tests - run : pytest diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 3510eda..d651a6d 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -29,7 +29,19 @@ jobs: - name: Install Python dependencies run: | pdm install + - name: Try to use cached Spot + id: cache-spot + uses: actions/cache@v4 + with: + path: spot-2.12 + key: ${{ runner.os }}-${{ matrix.python-version }}-spot-${{ hashFiles('get_spot.py') }} + - name: Install Spot + if: steps.cache-spot.outputs.cache-hit == 'true' + run: | + cd spot-2.12 + make install - name: Build and install Spot + if: steps.cache-spot.outputs.cache-hit != 'true' run: | pdm run python get_spot.py - name: Run tests