Skip to content

Commit 48b5dbc

Browse files
committed
Restoring the working ci
1 parent 1a908a0 commit 48b5dbc

1 file changed

Lines changed: 17 additions & 31 deletions

File tree

.github/workflows/ci.yml

Lines changed: 17 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: CI Workflow
22

33
on:
44
push:
5-
branches: [main]
5+
branches: [main, feature/windows-linux-compability]
66
pull_request:
77
branches: [main]
88
types: [opened, synchronize, reopened]
@@ -26,20 +26,17 @@ jobs:
2626
with:
2727
python-version: '3.9'
2828

29-
- name: Set up Swift
29+
- name: Set up Swift (macOS)
30+
if: matrix.os == 'macos-latest'
3031
run: |
31-
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
32-
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
33-
sudo xcodebuild -runFirstLaunch
34-
else
35-
# Install Swift for Linux
36-
wget https://download.swift.org/swift-6.0.3-release/ubuntu2404/swift-6.0.3-RELEASE/swift-6.0.3-RELEASE-ubuntu24.04.tar.gz
37-
tar xzf swift-6.0.3-RELEASE-ubuntu24.04.tar.gz
38-
sudo mv swift-6.0.3-RELEASE-ubuntu24.04 /usr/local/swift
39-
echo "/usr/local/swift/usr/bin" >> $GITHUB_PATH
40-
sudo apt update
41-
sudo apt install -y build-essential libc6-dev
42-
fi
32+
sudo xcode-select --switch /Applications/Xcode.app/Contents/Developer
33+
swift --version
34+
35+
- name: Set up Swift (Linux)
36+
if: matrix.os == 'ubuntu-latest'
37+
uses: swift-actions/setup-swift@v2 # Corrected repository name
38+
with:
39+
swift-version: "6.0"
4340

4441
- name: Set up Swift (Windows)
4542
if: matrix.os == 'windows-2022'
@@ -70,14 +67,14 @@ jobs:
7067
# run: |
7168
# :: 1. Initialize MSVC with the stable Windows SDK positional arguments
7269
# call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat" x64 10.0.22621.0 -vcvars_ver=14.29
73-
#
70+
#
7471
# :: 2. Explicitly set SDKROOT to the Swift Windows Platform SDK
7572
# :: This ensures Swift finds the Standard Library while using the MSVC headers above
7673
# set SDKROOT=C:\Users\runneradmin\AppData\Local\Programs\Swift\Platforms\6.0.3\Windows.platform\Developer\SDKs\Windows.sdk
77-
#
74+
#
7875
# :: 3. Clear SWIFTFLAGS to prevent interference with the build process
7976
# set SWIFTFLAGS=
80-
#
77+
#
8178
# :: 4. Run the build
8279
# bash ./build.sh
8380

@@ -90,6 +87,7 @@ jobs:
9087
elif [[ "${{ matrix.os }}" == "ubuntu-latest" ]]; then
9188
EXPECTED_LIB="loop_to_python_api/dlibs/linux/libLoopAlgorithmToPython.so"
9289
elif [[ "${{ matrix.os }}" == "windows-2022" ]]; then
90+
9391
echo "Windows build disabled - using existing committed .dll for tests"
9492
echo "Windows .dll file exists but is not automatically updated in CI"
9593
ls -la "loop_to_python_api/dlibs/windows/libLoopAlgorithmToPython.dll" || echo "Note: Windows .dll should be committed to repo"
@@ -170,17 +168,5 @@ jobs:
170168
find temp_libs/ -name "*.so" -exec mv {} loop_to_python_api/dlibs/linux/ \;
171169
find temp_libs/ -name "*.dll" -exec mv {} loop_to_python_api/dlibs/windows/ \;
172170
173-
# Add and commit the library file
174-
if [[ "${{ matrix.os }}" == "macos-latest" ]]; then
175-
git add ./loop_to_python_api/libLoopAlgorithmToPython.dylib
176-
git commit -m "Add generated libLoopAlgorithmToPython.dylib" || echo "No changes to commit"
177-
else
178-
git add ./loop_to_python_api/libLoopAlgorithmToPython.so
179-
git commit -m "Add generated libLoopAlgorithmToPython.so" || echo "No changes to commit"
180-
fi
181-
182-
# Commit if there are changes
183-
if git diff --staged --quiet; then
184-
echo "No library changes to commit"
185-
else
186-
git commit -m "Update compiled libraries for macOS and Linux
171+
git add loop_to_python_api/dlibs/
172+
git commit -m "chore: update binaries for macOS, Linux, and Windows [skip ci]" || echo "No changes to commit"

0 commit comments

Comments
 (0)