Skip to content

Commit

Permalink
WIP: debug
Browse files Browse the repository at this point in the history
  • Loading branch information
tronical committed Jan 4, 2024
1 parent 6f597c9 commit 957fd97
Showing 1 changed file with 89 additions and 83 deletions.
172 changes: 89 additions & 83 deletions .github/workflows/slint_tool_binary.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -33,102 +33,108 @@ env:
MACOSX_DEPLOYMENT_TARGET: "11.0"

jobs:
build_windows:
runs-on: windows-2022
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
with:
target: x86_64-pc-windows-msvc
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 6.5.1
cache: true
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-about
- name: Build
run: cargo build --verbose --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
- name: Create artifact directory
run: |
mkdir pkg
cd pkg
mkdir slint-${{ github.event.inputs.program || inputs.program }}
cd slint-${{ github.event.inputs.program || inputs.program }}
cp ..\..\target/release/slint-${{ github.event.inputs.program || inputs.program }}.exe ./
cd ..
cd ..
cd tools\${{ github.event.inputs.program || inputs.program }}
bash -x ../../scripts/prepare_binary_package.sh ..\..\pkg\slint-${{ github.event.inputs.program || inputs.program }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: slint-${{ github.event.inputs.program || inputs.program }}-windows
path: |
pkg
build_linux:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
with:
target: x86_64-unknown-linux-gnu
- name: Install Qt
uses: jurplel/install-qt-action@v3
with:
version: 5.15.2
cache: true
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-about
- name: Build
run: cargo build --verbose --no-default-features --features backend-qt,${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
- name: Create artifact directory
run: |
mkdir -p slint-${{ github.event.inputs.program || inputs.program }}
cp target/release/slint-${{ github.event.inputs.program || inputs.program }} slint-${{ github.event.inputs.program || inputs.program }}/
cd tools/${{ github.event.inputs.program || inputs.program }}
../../scripts/prepare_binary_package.sh ../../slint-${{ github.event.inputs.program || inputs.program }}
- name: Tar artifacts to preserve permissions
run: tar czvf slint-${{ github.event.inputs.program || inputs.program }}-linux.tar.gz slint-${{ github.event.inputs.program || inputs.program }}
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: slint-${{ github.event.inputs.program || inputs.program }}-linux
path: slint-${{ github.event.inputs.program || inputs.program }}-linux.tar.gz
# build_windows:
# runs-on: windows-2022
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup-rust
# with:
# target: x86_64-pc-windows-msvc
# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
# version: 6.5.1
# cache: true
# - uses: baptiste0928/cargo-install@v2
# with:
# crate: cargo-about
# - name: Build
# run: cargo build --verbose --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
# - name: Create artifact directory
# run: |
# mkdir pkg
# cd pkg
# mkdir slint-${{ github.event.inputs.program || inputs.program }}
# cd slint-${{ github.event.inputs.program || inputs.program }}
# cp ..\..\target/release/slint-${{ github.event.inputs.program || inputs.program }}.exe ./
# cd ..
# cd ..
# cd tools\${{ github.event.inputs.program || inputs.program }}
# bash -x ../../scripts/prepare_binary_package.sh ..\..\pkg\slint-${{ github.event.inputs.program || inputs.program }}
#
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: slint-${{ github.event.inputs.program || inputs.program }}-windows
# path: |
# pkg
#
# build_linux:
# runs-on: ubuntu-20.04
# steps:
# - uses: actions/checkout@v3
# - uses: ./.github/actions/setup-rust
# with:
# target: x86_64-unknown-linux-gnu
# - name: Install Qt
# uses: jurplel/install-qt-action@v3
# with:
# version: 5.15.2
# cache: true
# - uses: baptiste0928/cargo-install@v2
# with:
# crate: cargo-about
# - name: Build
# run: cargo build --verbose --no-default-features --features backend-qt,${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
# - name: Create artifact directory
# run: |
# mkdir -p slint-${{ github.event.inputs.program || inputs.program }}
# cp target/release/slint-${{ github.event.inputs.program || inputs.program }} slint-${{ github.event.inputs.program || inputs.program }}/
# cd tools/${{ github.event.inputs.program || inputs.program }}
# ../../scripts/prepare_binary_package.sh ../../slint-${{ github.event.inputs.program || inputs.program }}
# - name: Tar artifacts to preserve permissions
# run: tar czvf slint-${{ github.event.inputs.program || inputs.program }}-linux.tar.gz slint-${{ github.event.inputs.program || inputs.program }}
# - name: Upload artifact
# uses: actions/upload-artifact@v3
# with:
# name: slint-${{ github.event.inputs.program || inputs.program }}-linux
# path: slint-${{ github.event.inputs.program || inputs.program }}-linux.tar.gz

build_macos:
runs-on: macos-latest
steps:
- uses: actions/checkout@v3
# - uses: actions/checkout@v3
- uses: ./.github/actions/setup-rust
with:
target: x86_64-apple-darwin
- uses: ./.github/actions/setup-rust
with:
target: aarch64-apple-darwin
- uses: baptiste0928/cargo-install@v2
with:
crate: cargo-about
- name: Build x86_64
run: cargo build --verbose --target x86_64-apple-darwin --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
- name: Build aarch64
run: cargo build --verbose --target aarch64-apple-darwin --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
- name: Create artifact directory
# - uses: baptiste0928/cargo-install@v2
# with:
# crate: cargo-about
# - name: Build x86_64
# run: cargo build --verbose --target x86_64-apple-darwin --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
# - name: Build aarch64
# run: cargo build --verbose --target aarch64-apple-darwin --no-default-features --features ${{ github.event.inputs.features || inputs.features }} --release -p slint-${{ github.event.inputs.program || inputs.program }}
# - name: Create artifact directory
# run: |
# mkdir -p slint-${{ github.event.inputs.program || inputs.program }}
# cd slint-${{ github.event.inputs.program || inputs.program }}
# lipo -create -output ./slint-${{ github.event.inputs.program || inputs.program }} ../target/x86_64-apple-darwin/release/slint-${{ github.event.inputs.program || inputs.program }} ../target/aarch64-apple-darwin/release/slint-${{ github.event.inputs.program || inputs.program }}
# install_name_tool -add_rpath @executable_path/. ./slint-${{ github.event.inputs.program || inputs.program }}
# cd ..
# cd tools/${{ github.event.inputs.program || inputs.program }}
# ../../scripts/prepare_binary_package.sh ../../slint-${{ github.event.inputs.program || inputs.program }}
- name: boilerplate
run: |
mkdir -p slint-${{ github.event.inputs.program || inputs.program }}
cd slint-${{ github.event.inputs.program || inputs.program }}
lipo -create -output ./slint-${{ github.event.inputs.program || inputs.program }} ../target/x86_64-apple-darwin/release/slint-${{ github.event.inputs.program || inputs.program }} ../target/aarch64-apple-darwin/release/slint-${{ github.event.inputs.program || inputs.program }}
install_name_tool -add_rpath @executable_path/. ./slint-${{ github.event.inputs.program || inputs.program }}
cd ..
cd tools/${{ github.event.inputs.program || inputs.program }}
../../scripts/prepare_binary_package.sh ../../slint-${{ github.event.inputs.program || inputs.program }}
cargo new blah
cd blah
cargo build
- uses: ./.github/actions/codesign
with:
binary: slint-${{ github.event.inputs.program || inputs.program }}/slint-${{ github.event.inputs.program || inputs.program }}
#binary: slint-${{ github.event.inputs.program || inputs.program }}/slint-${{ github.event.inputs.program || inputs.program }}
binary: blah/target/debug/blah
certificate: ${{ secrets.APPLE_CERTIFICATE_P12 }}
certificate_password: ${{ secrets.APPLE_CERTIFICATE_P12_PASSWORD }}
keychain_password: ${{ secrets.APPLE_KEYCHAIN_PASSWORD }}
Expand Down

0 comments on commit 957fd97

Please sign in to comment.