Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

support splitting into panes, more and better builds #2

Merged
merged 1 commit into from
Jun 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
86 changes: 49 additions & 37 deletions .github/workflows/compile.yml
Original file line number Diff line number Diff line change
@@ -1,34 +1,10 @@
name: Release
on: [push, pull_request]
on: [push]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
CARGO_TERM_COLOR: always

jobs:
windows:
runs-on: windows-latest
defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v3
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build
run: BQN_WASM="D:/a/beacon/beacon/BQN.wasm" cargo build --release --no-default-features --features=bqnwasm
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: target/release/beacon.exe

linux:
runs-on: ubuntu-latest
steps:
Expand All @@ -42,22 +18,39 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Build bqn shared lib
build/obj
build/obj2
key: ${{ runner.os }}-${{ hashFiles('**/Cargo.lock') }}
- name: Install Rust Windows target
run: |
rustup update && rustup target add x86_64-pc-windows-gnu
sudo apt-get update
sudo apt-get install binutils-mingw-w64 mingw-w64
- name: Build bqn shared lib and wasm file
run: |
git clone https://github.com/dzaima/CBQN
cd CBQN
FFI=0 make shared-o3
mv libcbqn.so ../
- name: Build
FFI=0 make shared-o3 notui=1
wget https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-20/wasi-sdk-20.0-linux.tar.gz
tar xvf wasi-sdk-20.0-linux.tar.gz
FFI=0 make wasi-reactor-o3 notui=1 CC=./wasi-sdk-20.0/bin/clang
mv libcbqn.so BQN.wasm ../
- name: Build Linux
run: |
RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.so" cargo build --release
mv target/release/beacon ./beacon_linux
RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.so -C strip=symbols" cargo build --release
mv target/release/beacon ./beacon_x86_64-unknown-linux-gnu
- name: Build Windows
run: |
RUSTFLAGS='-C strip=symbols' BQN_WASM=${{ github.workspace }}/BQN.wasm cargo build --release --target x86_64-pc-windows-gnu --no-default-features --features=bqnwasm
mv target/x86_64-pc-windows-gnu/release/beacon.exe ./beacon_x86_64-pc-windows-gnu.exe
./beacon_x86_64-pc-windows-gnu.exe
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: ./beacon_linux
files: |
beacon_x86_64-unknown-linux-gnu
beacon_x86_64-pc-windows-gnu.exe

macos:
runs-on: macos-11
Expand All @@ -71,20 +64,39 @@ jobs:
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
build/obj
build/obj2
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install ARM target
- name: Install Rust ARM target
run: |
rustup update && rustup target add aarch64-apple-darwin
cargo install cargo-bundle || echo "already installed"
- name: Build x86
run: |
git clone https://github.com/dzaima/CBQN
cd CBQN
FFI=0 make shared-o3 notui=1
mv libcbqn.dylib ..
cd ..
RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn_86.dylib" cargo bundle --release
- name: Build ARM
run: RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn.dylib" cargo bundle --release --target=aarch64-apple-darwin
run: |
rm libcbqn.dylib
cd CBQN
FFI=0 CCFLAGS=--target=aarch64-apple-darwin make shared-o3 target_arch=aarch64 notui=1
mv libcbqn.dylib ..
cd ..
RUSTFLAGS="-L ${{ github.workspace }}" LD_LIBRARY_PATH="${{ github.workspace }}/libcbqn_arm.dylib" cargo bundle --release --target=aarch64-apple-darwin
- name: Create DMG
run: |
git clone https://github.com/create-dmg/create-dmg
chmod u+x create-dmg/create-dmg
./create-dmg/create-dmg Beacon.dmg target/aarch64-apple-darwin/release/bundle/osx/Beacon.app
./create-dmg/create-dmg Beacon_aarch64-apple-darwin.dmg target/aarch64-apple-darwin/release/bundle/osx/Beacon.app
./create-dmg/create-dmg Beacon_x86_64-apple-darwin.dmg target/release/bundle/osx/Beacon.app
- name: Release
uses: softprops/action-gh-release@v1
if: startsWith(github.ref, 'refs/tags/')
with:
files: Beacon.dmg
files: |
Beacon_aarch64-apple-darwin.dmg
Beacon_x86_64-apple-darwin.dmg
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
target
.DS_Store
lib*.*
Binary file removed BQN.wasm
Binary file not shown.
140 changes: 32 additions & 108 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading