Skip to content

Commit

Permalink
Merge From Upstream (#1, #2)
Browse files Browse the repository at this point in the history
This include changes from 53ce306 upto 4d8bb87, i.e. librime 1.11.0. Some commits are deliberately excluded. 5c7fb64 is temporarily excluded.

Co-authored-by: Qijia Liu <liumeo@pku.edu.cn>
Co-authored-by: Kian-Meng Ang <kianmeng.ang@gmail.com>
Co-authored-by: Weng Xuetian <wengxt@gmail.com>
Co-authored-by: fxliang <leungfax@gmail.com>
Co-authored-by: Bambooin <ooverflow@outlook.com>
Co-authored-by: ksqsf <login@ksqsf.moe>
Co-authored-by: ksqsf <i@ksqsf.moe>
Co-authored-by: Xing Chen · 单单 <me@nopdan.com>
Co-authored-by: wxyzhen <wxyzhen@gmail.com>
Co-authored-by: AlfredLouis00 <98323252+AlfredLouis00@users.noreply.github.com>
Co-authored-by: WhiredPlanck <whiredplanck@outlook.com>
Co-authored-by: wxyzh <wxyzhen@live.com>
Co-authored-by: 葉修齊 <54578647+siuze@users.noreply.github.com>
Co-authored-by: Shewer Lu <shewer@gmail.com>
Co-authored-by: fxliang <fx.liang@outlook.com>
Co-authored-by: groverlynn <groverlynn@gmail.com>
Co-authored-by: 居戎氏 <chen.sst@gmail.com>
Co-authored-by: Ace-Who <subsistence99@163.com>
Co-authored-by: morse.hsiao <6482586+imfuxiao@users.noreply.github.com>
Co-authored-by: Rocka <i@rocka.me>
Co-authored-by: LEO Yoon-Tsaw <leoyoontsaw@icloud.com>
Co-authored-by: mokapsing <39441028+mokapsing@users.noreply.github.com>
  • Loading branch information
23 people committed Mar 31, 2024
1 parent 1564d4a commit 7573b57
Show file tree
Hide file tree
Showing 183 changed files with 3,275 additions and 2,499 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
build
6 changes: 6 additions & 0 deletions .git-blame-ignore-revs
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# apply clang format in other folders
3368db1525b4441844cda859bb6fc70adaf845c6

# apply clang format in src folder
ab586ca1f32477edc00dfd6cfa555dd5425d283f

17 changes: 17 additions & 0 deletions .github/workflows/commit-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,11 +7,28 @@ on:
pull_request:

jobs:
lint:
runs-on: macos-14
steps:
- name: Checkout last commit
uses: actions/checkout@v4
- name: Install latest lang-format
run: brew update && brew install clang-format
- name: Code style lint
run: make clang-format-lint

linux:
needs: lint
uses: ./.github/workflows/linux-build.yml

macos:
needs: lint
uses: ./.github/workflows/macos-build.yml

windows:
needs: lint
uses: ./.github/workflows/windows-build.yml

docker:
needs: lint
uses: ./.github/workflows/docker-build.yml
16 changes: 16 additions & 0 deletions .github/workflows/docker-build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
name: Docker build
on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
steps:
- name: Checkout last commit
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build with plugins
run: docker build -t librime .
14 changes: 13 additions & 1 deletion .github/workflows/linux-build.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,23 @@
name: Linux build
on:
workflow_call:

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
compiler: [g++, clang]
compiler: [gcc, clang]
include:
- compiler: gcc
cxx_compiler: g++
- compiler: clang
cxx_compiler: clang++
env:
CC: ${{ matrix.compiler }}
CXX: ${{ matrix.cxx_compiler }}

steps:
- name: Checkout last commit
uses: actions/checkout@v4
Expand All @@ -19,3 +29,5 @@ jobs:

- name: Build
run: make release
env:
CMAKE_GENERATOR: Ninja
69 changes: 34 additions & 35 deletions .github/workflows/macos-build.yml
Original file line number Diff line number Diff line change
@@ -1,85 +1,84 @@
name: macOS build
on:
workflow_call:
inputs:
build_variant:
required: false
type: string
jobs:
build:
runs-on: macos-latest
runs-on: ${{ matrix.runs-on }}
strategy:
fail-fast: false
matrix:
runs-on: [macos-13, macos-14]
include:
- runs-on: macos-13
create-distributable: false
- runs-on: macos-14
create-distributable: ${{ github.event_name != 'pull_request' }}
build_variant: universal
env:
boost_version: 1.83.0
BOOST_ROOT: ${{ github.workspace }}/deps/boost_1_83_0
boost_version: 1.84.0
BOOST_ROOT: ${{ github.workspace }}/deps/boost-1.84.0
steps:
- name: Checkout last commit
uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure build variant
if: contains(inputs.build_variant, '-universal')
- name: Configure build environment
run: |
echo BUILD_UNIVERSAL=1 >> $GITHUB_ENV
brew install llvm ninja
echo "CMAKE_GENERATOR=Ninja" >> $GITHUB_ENV
echo "/usr/local/opt/llvm/bin" >> $GITHUB_PATH
- name: Cache Boost
id: cache-boost
uses: actions/cache@v3
with:
path: |
${{ env.BOOST_ROOT }}.tar.bz2
${{ env.BOOST_ROOT }}/stage
key: ${{ runner.os }}-boost-${{ env.boost_version }}

- name: Extract Boost source tarball
if: steps.cache-boost.outputs.cache-hit == 'true'
- name: Configure build variant
if: matrix.build_variant == 'universal'
run: |
pushd deps
tar --bzip2 -xf ${{ env.BOOST_ROOT }}.tar.bz2
popd
echo BUILD_UNIVERSAL=1 >> $GITHUB_ENV
- name: Install Boost
if: steps.cache-boost.outputs.cache-hit != 'true'
run: ./install-boost.sh

- name: Check submodules
run: git submodule > submodule-status

- name: Cache dependencies
id: cache-deps
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
bin
include
lib
share
key: ${{ runner.os }}${{ inputs.build_variant }}-deps-${{ hashFiles('submodule-status') }}
key: ${{ runner.os }}-${{ matrix.build_variant || runner.arch }}-deps-${{ hashFiles('submodule-status') }}

- name: Build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
run: make xcode/deps
run: make deps

- name: Build
run: make xcode
run: make release

- name: Set version info
if: matrix.create-distributable
run: |
echo "librime ${{ github.ref_name }}" >> version-info.txt
echo $(git ls-tree HEAD:plugins | awk '$2 == "commit" {print $4,$3}') >> version-info.txt
- name: Create distributable
if: matrix.create-distributable
run: |
make xcode/dist
tar -cjvf rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2 \
make install
tar -cjvf rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.build_variant || runner.arch }}.tar.bz2 \
dist version-info.txt
tar -cjvf rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2 \
tar -cjvf rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.build_variant || runner.arch }}.tar.bz2 \
--exclude '*/.placeholder' \
bin include lib share
- name: Upload artifacts
uses: actions/upload-artifact@v3
if: matrix.create-distributable
uses: actions/upload-artifact@v4
with:
name: artifact-${{ runner.os }}-${{ matrix.build_variant || runner.arch }}
path: |
rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2
rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}.tar.bz2
rime-TypeDuck-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.build_variant || runner.arch }}.tar.bz2
rime-deps-TypeDuck-${{ github.ref_name }}-${{ runner.os }}-${{ matrix.build_variant || runner.arch }}.tar.bz2
7 changes: 4 additions & 3 deletions .github/workflows/release-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,8 +11,6 @@ jobs:

macos:
uses: ./.github/workflows/macos-build.yml
with:
build_variant: '-universal'

windows:
uses: ./.github/workflows/windows-build.yml
Expand All @@ -22,7 +20,10 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
path: artifact
merge-multiple: true

- name: Create GitHub release
uses: softprops/action-gh-release@v1
Expand Down
Loading

0 comments on commit 7573b57

Please sign in to comment.