Skip to content

Conference results

Conference results #19

Workflow file for this run

name: CI_CEM
description: Continuous Integration workflow for PowerGenome and GenX CEM (capacity expansion model)
on:
push:
branches:
- main
pull_request:
branches:
- main
workflow_dispatch:
jobs:
test:
name: ${{ matrix.os }} - Julia ${{ matrix.julia-version }} - Python ${{ matrix.python-version }} - Gurobi ${{ matrix.gurobi-version }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
julia-version:
- '1.8'
os:
- ubuntu-latest
- macOS-latest
- windows-latest
python-version:
- '3.10'
gurobi-version:
- 'gurobi11'
steps:
- uses: actions/checkout@v4 # Checkout the repository
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
- uses: julia-actions/setup-julia@v2 # Setup Julia environment
with:
version: ${{ matrix.julia-version }}
- uses: conda-incubator/setup-miniconda@v3
with:
auto-update-conda: true
activate-environment: wec-decider-decider-2
environment-file: envs/calkit-environment.yml
auto-activate-base: false
python-version: ${{ matrix.python-version }}
# Install Gurobi
- name: Install Gurobi
if: matrix.os == 'ubuntu-latest'
run: |
# Download and install Gurobi (Linux only for now)
wget -q https://packages.gurobi.com/11.0/gurobi11.0.0_linux64.tar.gz
tar xzf gurobi11.0.0_linux64.tar.gz
sudo mv gurobi1100 /opt/gurobi
rm gurobi11.0.0_linux64.tar.gz
# Set environment variables
echo "GUROBI_HOME=/opt/gurobi/linux64" >> $GITHUB_ENV
echo "/opt/gurobi/linux64/bin" >> $GITHUB_PATH
echo "LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/gurobi/linux64/lib" >> $GITHUB_ENV
- name: configure NREL HSDS
shell: bash -l {0} # to use conda environment
run: |
# Create config file with actual secret value
cat > ~/.hscfg << EOF
hs_endpoint = https://developer.nrel.gov/api/hsds
hs_username = None
hs_password = None
hs_api_key = ${{ secrets.HSDS_API_KEY }}
EOF
- name: setup gurobi license
shell: bash -l {0} # to use conda environment
run: |
# Set environment variables for the license setup script
export WLSACCESSID="${{ secrets.WLSACCESSID }}"
export WLSSECRET="${{ secrets.WLSSECRET }}"
export LICENSEID="${{ secrets.LICENSEID }}"
# Run the license setup script
chmod +x scripts/setup_gurobi_license.sh
scripts/setup_gurobi_license.sh
# Make the license file path available to subsequent steps
echo "GRB_LICENSE_FILE=/tmp/gurobi_env.lic" >> $GITHUB_ENV
- name: make bash executable
run: chmod +x ./modules/CEM/run_all.sh
- name: run CEM tests
shell: bash -l {0} # to use conda environment
run: |
./modules/CEM/run_all.sh
env:
GUROBI_VERSION: ${{ matrix.gurobi-version }}