Skip to content

Commit 72cd300

Browse files
authored
Update tests.yml
1 parent 83ce714 commit 72cd300

File tree

1 file changed

+60
-43
lines changed

1 file changed

+60
-43
lines changed

.github/workflows/tests.yml

Lines changed: 60 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ jobs:
9292
castxml: "castxml"
9393
castxml-epic: 0
9494
cppstd: "-std=c++17"
95-
95+
9696
- os: ubuntu-22.04-arm64
9797
compiler: gcc
9898
version: "11"
@@ -132,7 +132,7 @@ jobs:
132132
castxml: "castxml"
133133
castxml-epic: 0
134134
cppstd: "-std=c++17"
135-
135+
136136
- os: ubuntu-24.04-arm64
137137
compiler: gcc
138138
version: "14"
@@ -148,7 +148,7 @@ jobs:
148148
castxml: "castxml"
149149
castxml-epic: 0
150150
cppstd: "-std=c++17"
151-
151+
152152
- os: ubuntu-24.04-arm64
153153
compiler: gcc
154154
version: "14"
@@ -168,7 +168,7 @@ jobs:
168168
- os: ubuntu-24.04-arm64
169169
compiler: gcc
170170
version: "14"
171-
pyton-version: "3.12"
171+
python-version: "3.12"
172172
castxml: "castxml"
173173
castxml-epic: 1
174174
cppstd: "-std=c++17"
@@ -197,50 +197,67 @@ jobs:
197197
- name: Display Python version
198198
run: python -c "import sys; print(sys.version)"
199199
- name: Install Python lib and test libs
200-
run: pip install '.[test]'
201-
200+
run: |
201+
pip install '.[test]'
202+
202203
- name: Run pycodestyle
203204
run: pycodestyle . --exclude=docs
204205

205-
- name: Setup CastXML
206+
# ─── Setup CastXML for Linux x86_64 ──────────────────────────────
207+
- name: Setup CastXML for Linux x86_64 (Ubuntu 22.04)
208+
if: matrix.os == 'ubuntu-22.04'
209+
run: |
210+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-ubuntu-22.04-x86_64.zip
211+
unzip -q castxml-ubuntu-22.04-x86_64.zip -d ~/
212+
# The zip contains an inner archive (a .tar.gz file); extract it:
213+
tar -xzf ~/castxml-ubuntu-22.04-x86_64.tar.gz -C ~/
214+
# Rename or move the extracted folder to a known location
215+
mv ~/castxml-ubuntu-22.04-x86_64 ~/castxml
216+
217+
- name: Setup CastXML for Linux x86_64 (Ubuntu 24.04)
218+
if: matrix.os == 'ubuntu-24.04'
219+
run: |
220+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-ubuntu-24.04-x86_64.zip
221+
unzip -q castxml-ubuntu-24.04-x86_64.zip -d ~/
222+
tar -xzf ~/castxml-ubuntu-24.04-x86_64.tar.gz -C ~/
223+
mv ~/castxml-ubuntu-24.04-x86_64 ~/castxml
224+
225+
# ─── Setup CastXML for Linux ARM64/aarch64 ─────────────────────────
226+
- name: Setup CastXML for Linux ARM64 (Ubuntu 22.04)
227+
if: matrix.os == 'ubuntu-22.04-arm64'
228+
run: |
229+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-ubuntu-22.04-arm-aarch64.zip
230+
unzip -q castxml-ubuntu-22.04-arm-aarch64.zip -d ~/
231+
tar -xzf ~/castxml-ubuntu-22.04-arm-aarch64.tar.gz -C ~/
232+
mv ~/castxml-ubuntu-22.04-arm-aarch64 ~/castxml
233+
234+
- name: Setup CastXML for Linux ARM64 (Ubuntu 24.04)
235+
if: matrix.os == 'ubuntu-24.04-arm64'
236+
run: |
237+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-ubuntu-24.04-arm-aarch64.zip
238+
unzip -q castxml-ubuntu-24.04-arm-aarch64.zip -d ~/
239+
tar -xzf ~/castxml-ubuntu-24.04-arm-aarch64.tar.gz -C ~/
240+
mv ~/castxml-ubuntu-24.04-arm-aarch64 ~/castxml
241+
242+
# ─── Setup CastXML for macOS ──────────────────────────────────────
243+
# For macOS, we assume different runners may need different binaries.
244+
- name: Setup CastXML for macOS (x86_64)
245+
if: matrix.os == 'macos-13'
246+
run: |
247+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-macos-15-x86_64.zip
248+
unzip -q castxml-macos-15-x86_64.zip -d ~/
249+
tar -xzf ~/castxml-macos-15-x86_64.tar.gz -C ~/
250+
mv ~/castxml-macos-15-x86_64 ~/castxml
251+
252+
- name: Setup CastXML for macOS (ARM)
253+
if: matrix.os == 'macos-15'
206254
run: |
207-
echo "Downloading CastXML from ${{ matrix.castxml_url }}..."
208-
wget -q "${{ matrix.castxml_url }}" -O "${{ matrix.castxml_filename }}"
209-
210-
echo "Unzipping ${{ matrix.castxml_filename }}..."
211-
unzip -q "${{ matrix.castxml_filename }}" -d ~/
212-
213-
if [ ! -f ~/"${{ matrix.castxml_tar_filename }}" ]; then
214-
echo "Error: Inner tar.gz archive '${{ matrix.castxml_tar_filename }}' not found!"
215-
exit 1
216-
fi
217-
218-
echo "Extracting ~/${{ matrix.castxml_tar_filename }} to ~/castxml_install..."
219-
mkdir -p ~/castxml_install
220-
tar -xzf ~/"${{ matrix.castxml_tar_filename }}" -C ~/castxml_install
221-
222-
# --- Windows-specific handling ---
223-
if [[ "${{ matrix.os }}" == "windows-latest" ]]; then
224-
if [ ! -f ~/castxml_install/castxml.exe ]; then
225-
echo "Error: castxml.exe binary not found in ~/castxml_install!"
226-
exit 1
227-
fi
228-
echo "Adding ~/castxml_install to PATH..."
229-
echo "$HOME/castxml_install" >> $GITHUB_PATH
230-
else
231-
# --- Handling for non-Windows platforms ---
232-
if [ ! -f ~/castxml_install/castxml ]; then
233-
echo "Error: castxml binary not found in ~/castxml_install!"
234-
exit 1
235-
fi
236-
chmod +x ~/castxml_install/castxml
237-
238-
echo "Adding ~/castxml_install to PATH..."
239-
echo "$HOME/castxml_install" >> $GITHUB_PATH
240-
fi
255+
wget -q https://github.com/CastXML/CastXMLSuperbuild/releases/download/v0.6.11/castxml-macos-15-arm64.zip
256+
unzip -q castxml-macos-15-arm64.zip -d ~/
257+
tar -xzf ~/castxml-macos-15-arm64.tar.gz -C ~/
258+
mv ~/castxml-macos-15-arm64 ~/castxml
241259
242260
- name: Run tests
243261
run: |
244-
echo "Using castxml at: $(which castxml)"
245-
castxml --version
262+
export PATH=~/castxml/bin:$PATH
246263
pytest tests

0 commit comments

Comments
 (0)