Skip to content

Commit 099cd4e

Browse files
committed
uncomment the macos build, it might work now
1 parent 92fc236 commit 099cd4e

File tree

1 file changed

+68
-69
lines changed

1 file changed

+68
-69
lines changed

.github/workflows/build_binary.yaml

+68-69
Original file line numberDiff line numberDiff line change
@@ -97,75 +97,74 @@ jobs:
9797
with:
9898
name: cargo-ui-linux
9999
path: cargo-ui-linux.tar.gz
100-
#
101-
# build_macos:
102-
# runs-on: macos-latest
103-
# steps:
104-
# - uses: actions/checkout@v2
105-
# - name: Install latest stable Rust
106-
# uses: actions-rs/toolchain@v1
107-
# with:
108-
# toolchain: stable
109-
# target: x86_64-apple-darwin
110-
# - name: Install latest stable Rust
111-
# uses: actions-rs/toolchain@v1
112-
# with:
113-
# toolchain: stable
114-
# target: aarch64-apple-darwin
115-
# - name: Select XCode version
116-
# run: sudo xcode-select -s "/Applications/Xcode_12.2.app"
117-
# - name: Select SDK
118-
# run: |
119-
# echo "SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path)" >> $GITHUB_ENV
120-
# echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version)" >> $GITHUB_ENV
121-
# - name: Cache Qt
122-
# id: cache-qt
123-
# uses: actions/cache@v2
124-
# with:
125-
# path: ~/work/cargo-ui/Qt
126-
# key: ${{ runner.os }}-${{ github.job }}-Qt
127-
# - name: Install Qt
128-
# uses: jurplel/install-qt-action@v2
129-
# with:
130-
# version: 6.2.0 # for Apple Silicon support
131-
# cached: ${{ steps.cache-qt.outputs.cache-hit }}
132-
# - uses: Swatinem/rust-cache@v1
133-
# - uses: actions-rs/[email protected]
134-
# with:
135-
# crate: cargo-about
136-
# - name: Build x86_64
100+
101+
build_macos:
102+
runs-on: macos-latest
103+
steps:
104+
- uses: actions/checkout@v2
105+
- name: Install latest stable Rust
106+
uses: actions-rs/toolchain@v1
107+
with:
108+
toolchain: stable
109+
target: x86_64-apple-darwin
110+
- name: Install latest stable Rust
111+
uses: actions-rs/toolchain@v1
112+
with:
113+
toolchain: stable
114+
target: aarch64-apple-darwin
115+
- name: Select XCode version
116+
run: sudo xcode-select -s "/Applications/Xcode_12.2.app"
117+
- name: Select SDK
118+
run: |
119+
echo "SDKROOT=$(xcrun -sdk macosx11.0 --show-sdk-path)" >> $GITHUB_ENV
120+
echo "MACOSX_DEPLOYMENT_TARGET=$(xcrun -sdk macosx11.0 --show-sdk-platform-version)" >> $GITHUB_ENV
121+
- name: Cache Qt
122+
id: cache-qt
123+
uses: actions/cache@v2
124+
with:
125+
path: ~/work/cargo-ui/Qt
126+
key: ${{ runner.os }}-${{ github.job }}-Qt
127+
- name: Install Qt
128+
uses: jurplel/install-qt-action@v2
129+
with:
130+
version: 6.2.0 # for Apple Silicon support
131+
cached: ${{ steps.cache-qt.outputs.cache-hit }}
132+
- uses: Swatinem/rust-cache@v1
133+
- uses: actions-rs/[email protected]
134+
with:
135+
crate: cargo-about
136+
- name: Build x86_64
137+
uses: actions-rs/cargo@v1
138+
with:
139+
command: build
140+
args: --verbose --target x86_64-apple-darwin --no-default-features --features sixtyfps-backend-qt --release
141+
# aarch64 doesn't cross-build because an aarch64 build of openssl can't be found
142+
# - name: Build aarch64
137143
# uses: actions-rs/cargo@v1
138144
# with:
139145
# command: build
140-
# args: --verbose --target x86_64-apple-darwin --no-default-features --features sixtyfps-backend-qt --release
141-
## aarch64 doesn't cross-build because an aarch64 build of openssl can't be found
142-
## - name: Build aarch64
143-
## uses: actions-rs/cargo@v1
144-
## with:
145-
## command: build
146-
## args: --verbose --target aarch64-apple-darwin --no-default-features --features sixtyfps-backend-qt --release
147-
## lipo -create -output bin/cargo-ui target/x86_64-apple-darwin/release/cargo-ui target/aarch64-apple-darwin/release/cargo-ui
148-
# - name: Create artifact directory
149-
# run: |
150-
# mkdir -p cargo-ui/3rdparty-licenses
151-
# cd cargo-ui
152-
# cp ../target/x86_64-apple-darwin/release/cargo-ui .
153-
# install_name_tool -add_rpath @executable_path/. ./cargo-ui
154-
# cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtCore.framework ./
155-
# cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtGui.framework ./
156-
# cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtWidgets.framework ./
157-
# cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtDBus.framework ./
158-
# mkdir -p ./plugins/platforms
159-
# cp -a ~/work/cargo-ui/Qt/6.2.0/macos/plugins/platforms/libqcocoa.dylib ./plugins/platforms
160-
# cd ..
161-
# cp ~/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sixtyfps-rendering-backend-qt-0.1.4/LICENSE.QT ~/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sixtyfps-rendering-backend-qt-0.1.4/QtThirdPartySoftware_Listing.txt cargo-ui/3rdparty-licenses/
162-
# cp ./LICENSE-* cargo-ui/3rdparty-licenses/
163-
# cargo about generate about.hbs -o cargo-ui/3rdparty-licenses/index.html
164-
# - name: Tar artifacts to preserve permissions
165-
# run: tar czvf cargo-ui-macos.tar.gz cargo-ui
166-
# - name: Upload artifact
167-
# uses: actions/upload-artifact@v2
168-
# with:
169-
# name: cargo-ui-macos
170-
# path: cargo-ui-macos.tar.gz
171-
#
146+
# args: --verbose --target aarch64-apple-darwin --no-default-features --features sixtyfps-backend-qt --release
147+
# lipo -create -output bin/cargo-ui target/x86_64-apple-darwin/release/cargo-ui target/aarch64-apple-darwin/release/cargo-ui
148+
- name: Create artifact directory
149+
run: |
150+
mkdir -p cargo-ui/3rdparty-licenses
151+
cd cargo-ui
152+
cp ../target/x86_64-apple-darwin/release/cargo-ui .
153+
install_name_tool -add_rpath @executable_path/. ./cargo-ui
154+
cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtCore.framework ./
155+
cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtGui.framework ./
156+
cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtWidgets.framework ./
157+
cp -a ~/work/cargo-ui/Qt/6.2.0/macos/lib/QtDBus.framework ./
158+
mkdir -p ./plugins/platforms
159+
cp -a ~/work/cargo-ui/Qt/6.2.0/macos/plugins/platforms/libqcocoa.dylib ./plugins/platforms
160+
cd ..
161+
cp ~/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sixtyfps-rendering-backend-qt-0.1.4/LICENSE.QT ~/.cargo/registry/src/github.jparrowsec.cn-1ecc6299db9ec823/sixtyfps-rendering-backend-qt-0.1.4/QtThirdPartySoftware_Listing.txt cargo-ui/3rdparty-licenses/
162+
cp ./LICENSE-* cargo-ui/3rdparty-licenses/
163+
cargo about generate about.hbs -o cargo-ui/3rdparty-licenses/index.html
164+
- name: Tar artifacts to preserve permissions
165+
run: tar czvf cargo-ui-macos.tar.gz cargo-ui
166+
- name: Upload artifact
167+
uses: actions/upload-artifact@v2
168+
with:
169+
name: cargo-ui-macos
170+
path: cargo-ui-macos.tar.gz

0 commit comments

Comments
 (0)