Skip to content

Commit

Permalink
1
Browse files Browse the repository at this point in the history
  • Loading branch information
Cryolitia committed Dec 26, 2024
1 parent 4a5c78a commit 7d0a46f
Show file tree
Hide file tree
Showing 5 changed files with 114 additions and 75 deletions.
61 changes: 17 additions & 44 deletions .github/workflows/cross-build.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,8 @@
name: Rust Cross Build
on:
workflow_dispatch:
inputs:
version:
description: 'Version number'
required: true
default: '7.0.0-beta-3'
push:
branches:
- 'test'

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
Expand Down Expand Up @@ -81,15 +78,21 @@ jobs:
scoop install main/llvm
scoop install main/mingw
scoop install main/nodejs
npm install -g opencc
pip install opencc --target $HOME
[Environment]::SetEnvironmentVariable("Path", $env:Path + ";$HOME/opencc/clib/bin", "Machine")
$env:Path += ";$HOME/opencc/clib/bin"
ls $HOME
ls $HOME/opencc
ls $HOME/opencc/clib
ls $HOME/opencc/clib/bin
opencc -v
${{ matrix.platform.setup }}
- name: Setup Linux Environment
if: ${{ runner.os == 'Linux' }}
run: |
sudo apt update
sudo apt install -y nodejs llvm clang pkg-config libssl-dev opencc
${{ matrix.platform.setup }}
- name: Set up Homebrew
id: set-up-homebrew
if: ${{ runner.os == 'macOS' }}
Expand All @@ -110,7 +113,11 @@ jobs:
- name: Install latest stable
uses: actions-rs/toolchain@v1
with:
toolchain: stable
toolchain: stable

- name: Build lang_unicodes
run: |
cargo build -p lang-unicodes
- name: BUILD PROTO
run: |
Expand All @@ -126,6 +133,7 @@ jobs:
env:
CARGO_WITH_NO_EXTRA: "True"
HARFBUZZ_SYS_NO_PKG_CONFIG: "True"
LANG_UNICODES_SKIP_DATA_BUILD: "True"

- name: Rename Package On Mac
if: ${{ runner.os == 'macOS'}}
Expand Down Expand Up @@ -196,40 +204,5 @@ jobs:
name: bindings-wasm32-wasip1
path: ./target/wasm32-wasip1/release/libffi-wasm32-wasip1.wasm
if-no-files-found: error
create-release:
runs-on: ubuntu-latest
needs: [build-wasm, cross-build]
steps:
- name: Create Release
uses: actions/create-release@v1
id: create_release
with:
tag_name: ${{ github.event.inputs.version }}
release_name: Release ${{ github.event.inputs.version }}
body: |
Release ${{ github.event.inputs.version }}
draft: false
prerelease: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

- uses: actions/download-artifact@v4
with:
path: ./artifacts
merge-multiple: true

- name: Display structure of downloaded files
run: ls -R ./artifacts

- name: prepare upload
run: |
mkdir release
- name: Release Upload Assets
uses: jaywcjlove/github-action-upload-assets@main
with:
tag: ${{github.event.inputs.version}}
asset-path: '["./artifacts/*"]'
token: ${{ secrets.GITHUB_TOKEN }}


11 changes: 0 additions & 11 deletions Cargo.lock

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

2 changes: 1 addition & 1 deletion Cross.toml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ zig = false # do not use zig cc for the builds
context = "." # the context folder to build the script in. defaults to `.`

[build.env]
passthrough = ["CARGO_WITH_NO_EXTRA", "HARFBUZZ_SYS_NO_PKG_CONFIG"]
passthrough = ["CARGO_WITH_NO_EXTRA", "HARFBUZZ_SYS_NO_PKG_CONFIG", "LANG_UNICODES_SKIP_DATA_BUILD"]

[target.aarch64-unknown-linux-gnu]
pre-build = [
Expand Down
5 changes: 1 addition & 4 deletions crates/lang_unicodes/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,5 @@ include = ["data", "src"]
[dependencies]
lazy_static = "1.5.0"

[build-dependencies]
opencc-rust = "1.1.19"

[lib]
path = "src/lib.rs"
path = "src/lib.rs"
Loading

0 comments on commit 7d0a46f

Please sign in to comment.