Skip to content

Commit ef54e55

Browse files
MacbookMacbook
authored andcommitted
refactor macos ne
1 parent 929ed84 commit ef54e55

File tree

3 files changed

+16
-72
lines changed

3 files changed

+16
-72
lines changed

.github/workflows/build_awg_macosne.yml

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

.github/workflows/build_cloak.yml

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -94,15 +94,10 @@ jobs:
9494
if: |
9595
contains(github.event.head_commit.message, '[all]') ||
9696
contains(github.event.head_commit.message, '[macos]') ||
97-
contains(github.event.head_commit.message, '[cloak]') ||
98-
contains(github.event.head_commit.message, '[cloak-macos]')
97+
contains(github.event.head_commit.message, '[cloak]')
9998
100-
name: "Build Cloak MacOS plugin"
99+
name: "Build Cloak Desktop plugin"
101100
steps:
102-
- name: 'Install GO'
103-
uses: actions/setup-go@v2
104-
with:
105-
go-version: '^1.22'
106101

107102
- name: Get Cloak
108103
uses: actions/checkout@v3
@@ -111,12 +106,16 @@ jobs:
111106
ref: master-amnezia
112107
path: Cloak
113108

114-
- name: Build for x86_64 MacOS
109+
# - name: 'Run build script'
110+
# working-directory: Cloak
111+
# run: |
112+
# CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
113+
- name: Build for x86_64
115114
working-directory: Cloak
116115
run: |
117116
CGO_ENABLED=1 GOOS="darwin" GOARCH="amd64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-x86_64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
118117
119-
- name: Build for arm64 MacOS
118+
- name: Build for arm64
120119
working-directory: Cloak
121120
run: |
122121
CGO_ENABLED=1 GOOS="darwin" GOARCH="arm64" go build -v -o ./release/plugin/darwin/ck-ovpn-plugin-arm64.a -buildmode=c-archive ./cmd/ck-ovpn-plugin/
@@ -242,4 +241,4 @@ jobs:
242241
file: desktop-plugin.zip
243242
tag: ${{ github.ref }}
244243
overwrite: true
245-
file_glob: true
244+
file_glob: true

.github/workflows/build_libssh_macos.yml

Lines changed: 7 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ jobs:
2121
contains(github.event.head_commit.message, '[libssh]')
2222
strategy:
2323
matrix:
24-
arch: [arm64]
24+
arch: [x86_64]
2525
# no-crypto=yes: builds version with all crypto disabled
2626
# no-crypto=no: builds version with all crypto enabled (where required dependencies are available)
2727
no_crypto:
@@ -48,34 +48,24 @@ jobs:
4848
- name: Build zlib
4949
run: |
5050
cd zlib-${{env.ZLIB_VERSION}}
51-
cmake . -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }}
51+
cmake .
5252
make zlibstatic
5353
cp ./libz.a ${{github.workspace}}/libssh-${{env.LIBSSH_VERSION}}/build/libz.a
5454
5555
- name: Build openssl
5656
run: |
5757
cd openssl-${{env.OPENSSL_VERSION}}
58-
./Configure no-asm no-shared darwin64-${{ matrix.arch }}-cc
58+
./Configure no-asm no-shared darwin64-x86_64-cc
5959
make
6060
6161
- name: Build libssh
6262
run: |
6363
cd libssh-${{env.LIBSSH_VERSION}}/build
64-
cmake .. -DCMAKE_BUILD_TYPE=Release -DCMAKE_OSX_ARCHITECTURES=${{ matrix.arch }} -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}
64+
cmake .. -DCMAKE_BUILD_TYPE=Release -DOPENSSL_USE_STATIC_LIBS=TRUE -DWITH_GSSAPI=OFF -DBUILD_SHARED_LIBS=OFF -DOPENSSL_ROOT_DIR=${{github.workspace}}/openssl-${{env.OPENSSL_VERSION}} -DZLIB_ROOT_DIR=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}} -DZLIB_LIBRARY=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}/libz.a -DZLIB_INCLUDE=${{github.workspace}}/zlib-${{env.ZLIB_VERSION}}
6565
make ssh
66-
make install
6766
68-
- name: Copy libssh.a to build directory
69-
run: |
70-
mkdir -p libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}
71-
cp /usr/local/lib/libssh.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libssh.a
72-
cp ${{ github.workspace }}/zlib-${{ env.ZLIB_VERSION }}/libz.a libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}/libz.a
73-
74-
- name: List files in build directory
75-
run: ls -la libssh-${{env.LIBSSH_VERSION}}/build/${{ matrix.arch }}
76-
7767
- name: Upload Artifact
78-
uses: actions/upload-artifact@v3
68+
uses: actions/upload-artifact@v2.2.4
7969
with:
8070
name: libssh-macos-${{ matrix.arch }}
8171
path: ${{ github.workspace }}/libssh-${{env.LIBSSH_VERSION}}/build
@@ -90,7 +80,7 @@ jobs:
9080

9181
steps:
9282
- name: Setup | Checkout
93-
uses: actions/checkout@v4
83+
uses: actions/checkout@v2
9484

9585
- name: Setup | Artifacts
9686
uses: actions/download-artifact@v2
@@ -109,4 +99,4 @@ jobs:
10999
tag: ${{ github.ref }}
110100
overwrite: true
111101
file_glob: true
112-
102+

0 commit comments

Comments
 (0)