mirror of
https://github.com/MatsuriDayo/nekoray.git
synced 2025-12-20 23:20:08 +08:00
wip: macOS build
This commit is contained in:
parent
2e991b675d
commit
c779ffc528
29
.github/workflows/build-qv2ray-cmake.yml
vendored
29
.github/workflows/build-qv2ray-cmake.yml
vendored
@ -53,7 +53,8 @@ jobs:
|
|||||||
runs-on: ${{ matrix.platform }}
|
runs-on: ${{ matrix.platform }}
|
||||||
env:
|
env:
|
||||||
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
ACTIONS_ALLOW_UNSECURE_COMMANDS: true
|
||||||
|
needs:
|
||||||
|
- build-go
|
||||||
steps:
|
steps:
|
||||||
- name: Checking out sources
|
- name: Checking out sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
@ -66,6 +67,11 @@ jobs:
|
|||||||
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
|
# 14.1 is for vs2017, 14.2 is vs2019, following the upstream vcpkg build from Qv2ray-deps repo
|
||||||
toolset: 14.2
|
toolset: 14.2
|
||||||
arch: ${{ matrix.arch }}
|
arch: ${{ matrix.arch }}
|
||||||
|
- name: Download Artifacts
|
||||||
|
if: matrix.platform == 'macos-11'
|
||||||
|
uses: actions/download-artifact@v3
|
||||||
|
with:
|
||||||
|
path: download-artifact
|
||||||
- name: Cache Qt
|
- name: Cache Qt
|
||||||
id: cache-qt
|
id: cache-qt
|
||||||
uses: actions/cache@v3
|
uses: actions/cache@v3
|
||||||
@ -140,7 +146,6 @@ jobs:
|
|||||||
path: artifacts.tgz
|
path: artifacts.tgz
|
||||||
publish:
|
publish:
|
||||||
name: Publish Release
|
name: Publish Release
|
||||||
if: github.event.inputs.publish != 'y'
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
needs:
|
needs:
|
||||||
- build-cpp
|
- build-cpp
|
||||||
@ -148,11 +153,11 @@ jobs:
|
|||||||
steps:
|
steps:
|
||||||
- name: Checking out sources
|
- name: Checking out sources
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v2
|
||||||
- name: Donwload Artifacts
|
- name: Download Artifacts
|
||||||
uses: actions/download-artifact@v3
|
uses: actions/download-artifact@v3
|
||||||
with:
|
with:
|
||||||
path: download-artifact
|
path: download-artifact
|
||||||
- name: Release
|
- name: Pack
|
||||||
run: |
|
run: |
|
||||||
source libs/deploy_common.sh
|
source libs/deploy_common.sh
|
||||||
curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar xzv
|
curl -Lo - https://github.com/tcnksm/ghr/releases/download/v0.13.0/ghr_v0.13.0_linux_amd64.tar.gz | tar xzv
|
||||||
@ -161,7 +166,6 @@ jobs:
|
|||||||
cd deployment
|
cd deployment
|
||||||
cp -r assets/* linux64
|
cp -r assets/* linux64
|
||||||
cp -r assets/* windows64
|
cp -r assets/* windows64
|
||||||
cp -r assets/* macos-amd64
|
|
||||||
rm -rf assets *.pdb
|
rm -rf assets *.pdb
|
||||||
####
|
####
|
||||||
mv linux64 nekoray
|
mv linux64 nekoray
|
||||||
@ -172,9 +176,14 @@ jobs:
|
|||||||
zip -r $version_standalone-windows64.zip nekoray
|
zip -r $version_standalone-windows64.zip nekoray
|
||||||
rm -rf nekoray
|
rm -rf nekoray
|
||||||
####
|
####
|
||||||
mv macos-amd64 nekoray
|
mv macos-amd64/nekoray.dmg $version_standalone-macos-amd64.dmg
|
||||||
zip -r $version_standalone-macos-amd64.zip nekoray
|
rm -rf macos-amd64
|
||||||
rm -rf nekoray
|
- name: Uploading Artifact
|
||||||
####
|
uses: actions/upload-artifact@master
|
||||||
cd ..
|
with:
|
||||||
|
name: Deployment-${{ github.sha }}
|
||||||
|
path: deployment
|
||||||
|
- name: Release
|
||||||
|
if: github.event.inputs.publish != 'y'
|
||||||
|
run: |
|
||||||
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment
|
./ghr -delete -t "${{ github.token }}" -n "${{ github.event.inputs.tag }}" "${{ github.event.inputs.tag }}" deployment
|
||||||
@ -4,8 +4,8 @@ set -e
|
|||||||
source libs/deploy_common.sh
|
source libs/deploy_common.sh
|
||||||
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
|
[ "$GOOS" == "windows" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/windows64 || true
|
||||||
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true
|
[ "$GOOS" == "linux" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/linux64 || true
|
||||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/mac-amd64 || true
|
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "amd64" ] && DEST=$DEPLOYMENT/macos-amd64 || true
|
||||||
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/mac-arm64 || true
|
[ "$GOOS" == "darwin" ] && [ "$GOARCH" == "arm64" ] && DEST=$DEPLOYMENT/macos-arm64 || true
|
||||||
if [ -z $DEST ]; then
|
if [ -z $DEST ]; then
|
||||||
echo "Please set GOOS GOARCH"
|
echo "Please set GOOS GOARCH"
|
||||||
exit 1
|
exit 1
|
||||||
|
|||||||
@ -12,6 +12,13 @@ DEST=$DEPLOYMENT/macos-$ARCH
|
|||||||
rm -rf $DEST
|
rm -rf $DEST
|
||||||
mkdir -p $DEST
|
mkdir -p $DEST
|
||||||
|
|
||||||
|
#### copy golang & asset => .app ####
|
||||||
|
pushd download-artifact
|
||||||
|
find . -name artifacts.tgz | xargs -n1 tar xvzf
|
||||||
|
mv deployment/assets/* deployment/macos-$ARCH
|
||||||
|
mv deployment/macos-$ARCH/* $BUILD/nekoray.app/Contents/MacOS
|
||||||
|
popd
|
||||||
|
|
||||||
#### deploy qt & DLL runtime => dmg ####
|
#### deploy qt & DLL runtime => dmg ####
|
||||||
pushd $BUILD
|
pushd $BUILD
|
||||||
macdeployqt nekoray.app -dmg -verbose=3
|
macdeployqt nekoray.app -dmg -verbose=3
|
||||||
|
|||||||
@ -1 +1 @@
|
|||||||
803c7ea316fdc9d953ea62a2459e2221e0ed0911
|
46ba6137206cb0e0fc3433b3459237c55132aabe
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user