Skip to content

Commit 580fbe6

Browse files
committed
Remove docker related files, align CI with the current curvelet workflow by restoring separate basic and secret-backed CurveLab jobs
1 parent c4af114 commit 580fbe6

File tree

6 files changed

+101
-182
lines changed

6 files changed

+101
-182
lines changed

.github/workflows/ci.yml

Lines changed: 101 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -8,36 +8,124 @@ on:
88
branches: [main]
99

1010
jobs:
11-
test:
11+
test-basic:
1212
runs-on: ubuntu-latest
1313
strategy:
1414
matrix:
1515
python-version: ["3.11", "3.12", "3.13"]
1616
steps:
1717
- uses: actions/checkout@v4
1818

19-
# Install system dependencies (like in your Docker container)
2019
- name: Install system dependencies
21-
run: sudo apt-get update && sudo apt-get install -y libgl1 libglib2.0-0 python3-venv
20+
run: |
21+
sudo apt-get update
22+
sudo apt-get install -y libgl1 libglib2.0-0 python3-venv
2223
23-
# Set up Python
2424
- uses: actions/setup-python@v5
2525
with:
2626
python-version: ${{ matrix.python-version }}
2727

28-
# Create virtual environment
29-
- name: Create virtual environment
28+
- name: Install dependencies
3029
run: |
31-
python -m venv venv
32-
source venv/bin/activate
33-
python -m pip install --upgrade pip setuptools wheel
30+
python -m pip install --upgrade pip
3431
python -m pip install -e .
3532
python -m pip install pytest ruff
3633
37-
# Run tests in the venv
38-
- name: Run tests
34+
- name: Run basic tests
35+
env:
36+
TMEQ_RUN_CURVELETS: "0"
37+
QT_QPA_PLATFORM: "offscreen"
38+
run: |
39+
pytest -q -rs
40+
41+
# Secure build with CurveLab; skip on forked PRs (no secrets on forks).
42+
test-curvelab:
43+
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository }}
44+
runs-on: ubuntu-latest
45+
strategy:
46+
matrix:
47+
python-version: ["3.11", "3.12"]
48+
steps:
49+
- uses: actions/checkout@v4
50+
51+
- uses: actions/setup-python@v5
52+
with:
53+
python-version: ${{ matrix.python-version }}
54+
55+
- name: Install system dependencies
56+
run: |
57+
sudo apt-get update
58+
sudo apt-get install -y build-essential gcc g++ make wget curl unzip libgl1 libglib2.0-0
59+
60+
- name: Fetch CurveLab archive
61+
shell: bash
62+
env:
63+
FETCH_FDCT: ${{ secrets.FETCH_FDCT }}
64+
run: |
65+
set -euo pipefail
66+
if [ -z "${FETCH_FDCT}" ]; then
67+
echo "::error title=Missing secret::FETCH_FDCT is empty. It must download utils/CurveLab-2.1.3.tar.gz."
68+
exit 1
69+
fi
70+
mkdir -p utils
71+
cd utils
72+
echo "-- Pre eval --"
73+
ls -la
74+
echo "Downloading CurveLab archive via FETCH_FDCT..."
75+
eval "${FETCH_FDCT}"
76+
echo "-- Post eval --"
77+
ls -la
78+
if [ ! -f "CurveLab-2.1.3.tar.gz" ]; then
79+
echo "::error title=CurveLab archive missing after FETCH_FDCT::Expected utils/CurveLab-2.1.3.tar.gz to exist after running FETCH_FDCT."
80+
echo "Files in utils/:"
81+
ls -la
82+
exit 1
83+
fi
84+
if command -v file >/dev/null 2>&1; then
85+
echo "Downloaded archive mime-type:"
86+
MIME="$(file -b --mime-type "CurveLab-2.1.3.tar.gz" || true)"
87+
echo "${MIME}"
88+
if [[ "${MIME}" == text/html* ]]; then
89+
echo "::error title=CurveLab download returned HTML::Likely a 403/redirect. Showing first 40 lines:"
90+
head -n 40 "CurveLab-2.1.3.tar.gz" || true
91+
echo "Fix: update FETCH_FDCT to use 'curl --fail-with-body -fL ... -o CurveLab-2.1.3.tar.gz <URL>' so it fails on 403 instead of saving HTML."
92+
exit 1
93+
fi
94+
fi
95+
96+
- name: Prepare FFTW + CurveLab toolchain
97+
env:
98+
FDCT: ""
99+
FFTW: ""
100+
CPPFLAGS: ""
101+
LDFLAGS: ""
102+
run: |
103+
unset FDCT FFTW CPPFLAGS LDFLAGS
104+
bash .github/ci_setup_curvelab.sh
105+
106+
- name: Validate CurveLab libraries
107+
run: |
108+
echo "Testing CurveLab compilation..."
109+
if [ -z "${FDCT:-}" ]; then
110+
echo "❌ FDCT environment variable not set by ci_setup_curvelab.sh"
111+
exit 1
112+
fi
113+
echo "FDCT=${FDCT}"
114+
ls -la "${FDCT}" || true
115+
ls -la "${FDCT}/fdct_wrapping_cpp/src" || true
116+
ls -la "${FDCT}/fdct3d/src" || true
117+
test -f "${FDCT}/fdct_wrapping_cpp/src/libfdct_wrapping.a" && echo "✅ libfdct_wrapping.a built" || (echo "❌ libfdct_wrapping.a missing"; exit 1)
118+
test -f "${FDCT}/fdct3d/src/libfdct3d.a" && echo "✅ libfdct3d.a built" || (echo "❌ libfdct3d.a missing"; exit 1)
119+
120+
- name: Install Python dependencies
121+
run: |
122+
python -m pip install --upgrade pip
123+
python -m pip install -e ".[curvelops]"
124+
python -m pip install pytest ruff
125+
126+
- name: Run tests with CurveLab
39127
env:
128+
TMEQ_RUN_CURVELETS: "1"
40129
QT_QPA_PLATFORM: "offscreen"
41130
run: |
42-
source venv/bin/activate
43-
pytest -rs
131+
pytest -q -rs

.github/workflows/manual-test.yml

Lines changed: 0 additions & 14 deletions
This file was deleted.

docker/.dockerignore

Lines changed: 0 additions & 28 deletions
This file was deleted.

docker/Dockerfile

Lines changed: 0 additions & 51 deletions
This file was deleted.

docker/README.md

Lines changed: 0 additions & 50 deletions
This file was deleted.

docker/docker-compose.yml

Lines changed: 0 additions & 26 deletions
This file was deleted.

0 commit comments

Comments
 (0)