-
Notifications
You must be signed in to change notification settings - Fork 44
42 lines (38 loc) · 1.52 KB
/
install_ff.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
name: Test FF Installations
on: [push, pull_request]
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10"] # Matrix with different Python versions
steps:
# Step 1: Check out the repository
- name: Check out code
uses: actions/checkout@v3
# Step 2: Set up Miniconda
- name: Set up Miniconda
uses: conda-incubator/setup-miniconda@v2
with:
auto-update-conda: true
python-version: ${{ matrix.python-version }}
activate-environment: test_env
# Step 3: Run all installation scripts for each Python version
- name: Run installation scripts
shell: bash -l {0}
run: |
for script in jarvis_leaderboard/installations/FF/*.sh; do
# Extract script name to use as the environment name (without extension)
env_name=$(basename "$script" .sh)-${{ matrix.python-version }}
echo "Creating Conda environment: $env_name with Python ${{ matrix.python-version }}"
conda create -n "$env_name" python=${{ matrix.python-version }} -y
echo "Activating environment: $env_name"
conda activate "$env_name"
echo "Running $script"
chmod +x "$script"
bash "$script" || { echo "Error: $script failed"; exit 1; }
echo "Deactivating environment: $env_name"
conda deactivate
echo "Removing environment: $env_name"
conda env remove -n "$env_name" -y
done