Skip to content

Commit b8e8383

Browse files
committed
Refactor CI workflow to include build environment setup.
Updated the sync-upstream CI to install system dependencies, configure vcpkg, and set up a virtual environment for building C extensions. This ensures a consistent development and testing environment across builds.
1 parent c03d84f commit b8e8383

File tree

1 file changed

+37
-4
lines changed

1 file changed

+37
-4
lines changed

.github/workflows/sync-upstream.yaml

Lines changed: 37 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -63,11 +63,44 @@ jobs:
6363
git commit -m "Merge upstream/${{ env.UPSTREAM_BRANCH }} into unstable, keeping fork deletions/overrides" || echo "No commit needed"
6464
git push origin ${{ env.UNSTABLE_BRANCH }}
6565
66-
- name: Run tests on unstable
66+
- name: Install system dependencies
6767
run: |
68-
python -m pip install --upgrade pip
69-
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
70-
pytest -q || exit 1
68+
sudo apt-get update
69+
sudo apt-get install git build-essential libxmu-dev libxi-dev libgl-dev libglew-dev libpng-dev libfreetype6-dev libxml2-dev libmsgpack-dev libglm-dev libnetcdf-dev linux-libc-dev autoconf perl
70+
71+
- name: Initialize vcpkg
72+
run: |
73+
git clone https://github.com/Microsoft/vcpkg.git vendor/vcpkg
74+
75+
- name: Setup Python 3.11
76+
uses: actions/setup-python@v5
77+
with:
78+
python-version: "3.11"
79+
80+
- name: Create virtual environment
81+
run: |
82+
python -m venv .venv
83+
source .venv/bin/activate
84+
python -m pip install wheel setuptools cibuildwheel
85+
python -m pip install -r requirements.txt
86+
87+
- name: Bootstrap vcpkg
88+
run: ${{ env.VCPKG_ROOT }}/bootstrap-vcpkg.sh -disableMetrics
89+
90+
- name: Install vcpkg dependencies
91+
run: |
92+
${{ env.VCPKG_ROOT }}/vcpkg install
93+
94+
- name: Last build environment setup steps
95+
run: |
96+
source .venv/bin/activate
97+
python automations/my_automator.py setup dev-env
98+
99+
- name: Build C extension
100+
run: |
101+
source .venv/bin/activate
102+
python automations/my_automator.py setup dev-env
103+
cibuildwheel .
71104
72105
- name: Detect if unstable has diverged from production
73106
id: changes

0 commit comments

Comments
 (0)