File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ #! /bin/bash
2+ set -e
3+
4+ PLATFORM=$1
5+ ARCH=$2
6+
7+ # Install dependencies
8+ brew install cmake openssl@3
9+
10+ # Build libssh2
11+ cd Native/libssh2
12+ mkdir -p build
13+ cd build
14+
15+ cmake .. \
16+ -DCMAKE_BUILD_TYPE=Release \
17+ -DBUILD_SHARED_LIBS=ON \
18+ -DENABLE_ZLIB_COMPRESSION=ON \
19+ -DCRYPTO_BACKEND=OpenSSL \
20+ -DOPENSSL_ROOT_DIR=$( brew --prefix openssl@3) \
21+ -DCMAKE_OSX_ARCHITECTURES=$ARCH \
22+ -DBUILD_EXAMPLES=OFF \
23+ -DBUILD_TESTING=OFF
24+
25+ cmake --build . --config Release -j$( sysctl -n hw.ncpu)
26+
27+ # Create output directory
28+ mkdir -p " ../../../NullOpsDevs.LibSsh/runtimes/$PLATFORM /native"
29+
30+ # Copy the dylib
31+ cp src/libssh2* .dylib " ../../../NullOpsDevs.LibSsh/runtimes/$PLATFORM /native/libssh2.dylib"
Original file line number Diff line number Diff line change 1111 - ' .github/scripts/**'
1212
1313jobs :
14- build-all :
14+ build-linux-windows :
1515 runs-on : ubuntu-latest
1616 strategy :
1717 fail-fast : false
2626 - platform : linux-arm64
2727 dockerfile_platform : linux/arm64
2828 target_triple : aarch64-linux-gnu
29- - platform : osx-x64
30- dockerfile_platform : linux/amd64
31- target_triple : x86_64-apple-darwin
32- - platform : osx-arm64
33- dockerfile_platform : linux/amd64
34- target_triple : aarch64-apple-darwin
3529 steps :
3630 - uses : actions/checkout@v4
3731 with :
5448 name : libssh2-${{ matrix.platform }}
5549 path : NullOpsDevs.LibSsh/runtimes/${{ matrix.platform }}/native/
5650
51+ build-macos :
52+ runs-on : macos-latest
53+ strategy :
54+ fail-fast : false
55+ matrix :
56+ include :
57+ - platform : osx-x64
58+ arch : x86_64
59+ - platform : osx-arm64
60+ arch : arm64
61+ steps :
62+ - uses : actions/checkout@v4
63+ with :
64+ submodules : recursive
65+
66+ - name : Build libssh2 for macOS
67+ run : |
68+ chmod +x .github/scripts/build-macos.sh
69+ .github/scripts/build-macos.sh "${{ matrix.platform }}" "${{ matrix.arch }}"
70+
71+ - name : Upload artifacts
72+ uses : actions/upload-artifact@v4
73+ with :
74+ name : libssh2-${{ matrix.platform }}
75+ path : NullOpsDevs.LibSsh/runtimes/${{ matrix.platform }}/native/
76+
5777 package :
58- needs : [build-all ]
78+ needs : [build-linux-windows, build-macos ]
5979 runs-on : ubuntu-latest
6080 steps :
6181 - uses : actions/checkout@v4
You can’t perform that action at this time.
0 commit comments