Skip to content

Commit

Permalink
ci: deduplicate jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
elopez committed Jan 3, 2025
1 parent 6dff778 commit 4c29cf5
Showing 1 changed file with 12 additions and 70 deletions.
82 changes: 12 additions & 70 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,87 +11,29 @@ on:
- cron: '0 12 * * *'

jobs:
linux:
name: CI (Linux)
runs-on: ubuntu-latest
tests:
name: CI (Python ${{ matrix.python }} on ${{ matrix.os }}, ${{ matrix.type }} test)
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
type: ["solc_upgrade", "linux", "solc"]
python: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
os: ["ubuntu-latest", "macos-latest", "windows-2022"]
type: ["solc", "solc_upgrade", "os_specific"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install solc-select
run: |
sudo pip install .
${{ (matrix.os != 'windows-2022' && 'sudo pip install .') || 'pip install . --user' }}
solc-select install all
- name: Run Tests
env:
TEST_TYPE: ${{ matrix.type }}
TEST_TYPE: ${{ (matrix.type != 'os_specific' && matrix.type) || runner.os }}
run: |
TEST_TYPE="$(echo "$TEST_TYPE" | tr '[:upper:]' '[:lower:]')"
bash scripts/test_${TEST_TYPE}.sh
macos:
name: CI (macOS)
runs-on: macos-latest
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
type: ["solc_upgrade", "macos", "solc"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install solc-select
run: |
sudo pip install .
solc-select install all
- name: Run Tests
env:
TEST_TYPE: ${{ matrix.type }}
run: |
bash scripts/test_${TEST_TYPE}.sh
windows:
name: CI (Windows)
runs-on: windows-2022
strategy:
matrix:
python:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
type: ["windows", "solc"]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install solc-select
run: |
pip install . --user
solc-select install all
- name: Run Tests
env:
TEST_TYPE: ${{ matrix.type }}
run: |
bash scripts/test_${TEST_TYPE}.sh
shell: bash

0 comments on commit 4c29cf5

Please sign in to comment.