Skip to content

Commit

Permalink
dict-to-mozc repository change
Browse files Browse the repository at this point in the history
  • Loading branch information
phoepsilonix committed Oct 9, 2024
1 parent ac3081b commit 1519cbb
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 57 deletions.
49 changes: 0 additions & 49 deletions .github/workflows/check-branch.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -140,52 +140,3 @@ jobs:
}
}
repository: ${{ github.repository }}

# build_deb
# needs: sync-master
# strategy:
# matrix:
# os: [debian-bookworm, ubuntu-lunar, ubuntu-mantic, ubuntu-noble, debian-bookworm-with-jp-dict, ubuntu-lunar-with-jp-dict, ubuntu-mantic-with-jp-dict, ubuntu-noble-with-jp-dict]
# runs-on: ubuntu-latest
# steps:
# - name: Checkout
# uses: actions/checkout@v4
# with:
# fetch-depth: 0

# - name: Configure Git
# run: |
# git config user.name github-actions
# git config user.email [email protected]

# - name: tag
# id: tag
# shell: bash
# run: |
# BRANCH=${{ matrix.os }}
# BRANCH=${BRANCH#*-};
# BRANCH=${BRANCH%-with-jp-dict}
# if [[ "${{ matrix.os }}" =~ "-with-jp-dict" ]]; then
# TAG=with-commit-${BRANCH#*-}-"${{ needs.sync-master.outputs.mozc_commit }}"
# echo "tag=$TAG" >> $GITHUB_OUTPUT
# else
# TAG=commit-${BRANCH#*-}-"${{ needs.sync-master.outputs.mozc_commit }}"
# echo "tag=$TAG" >> $GITHUB_OUTPUT
# fi
# git switch ${{ matrix.os }}
# git tag $TAG
# git push origin $TAG
# - name: Trigger release workflow
# uses: peter-evans/repository-dispatch@v3
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# event-type: new-tag-created
# client-payload: |-
# {
# "repo": {
# "name": "${{ github.repository }}",
# "branch": "${{ matrix.os }}",
# "tag": "${{ steps.tag.outputs.tag }}"
# }
# }
# repository: ${{ github.repository }}
15 changes: 7 additions & 8 deletions .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -261,10 +261,10 @@ jobs:
echo "Running Rust program for ${{ matrix.os }}"
- name: Added SudachiDict for -with-jp-dict
run: |
git clone --filter=tree:0 --single-branch https://github.com/phoepsilonix/mozcdict-ext.git
cd mozcdict-ext/sudachi
_mozcdict_ext_commit=ae5f2e42e2edfeaa0e3127cf39980ea9889ddda0
git checkout $_mozcdict_ext_commit
git clone --filter=tree:0 --single-branch https://github.com/phoepsilonix/dict-to-mozc.git
cd dict-to-mozc
_dict_to_mozc_commit=b849f77255f05c9a89b65accc8f9306db6a21477
git checkout $_dict_to_mozc_commit
. "$HOME/.cargo/env"
_sudachidict_date=$(curl -s 'http://sudachi.s3-website-ap-northeast-1.amazonaws.com/sudachidict-raw/' | grep -o '<td>[0-9]*</td>' | grep -o '[0-9]*' | sort -n | tail -n 1)
curl -LO "http://sudachi.s3-website-ap-northeast-1.amazonaws.com/sudachidict-raw/${_sudachidict_date}/small_lex.zip"
Expand All @@ -278,10 +278,9 @@ jobs:
rustup update stable
rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n) | grep -v musl && TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep -v musl|head -n1) || TARGET=$(rustup target list --installed | grep $(rustc -vV | sed -e 's|host: ||' -e 's|-gnu||p' -n)|grep musl|head -n1)
cargo build --release --target $TARGET
./target/$TARGET/release/dict-to-mozc -s -i ../../source/src/data/dictionary_oss/id.def -f sudachi.csv > ./all-dict.txt
awk -f dup.awk all-dict.txt > finish-dict.txt
cat finish-dict.txt >> ../../source/src/data/dictionary_oss/dictionary00.txt
rm all-dict.txt finish-dict.txt
./target/$TARGET/release/dict-to-mozc -s -i ../source/src/data/dictionary_oss/id.def -f sudachi.csv > ./all-dict.txt
cat all-dict.txt >> ../source/src/data/dictionary_oss/dictionary00.txt
rm all-dict.txt
- name: Build
shell: bash
run: |
Expand Down

0 comments on commit 1519cbb

Please sign in to comment.