-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
310 changed files
with
55,032 additions
and
48,344 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
* -text |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
name: build lsys-lib-area php extension | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*-php-lib-area-ext" | ||
|
||
jobs: | ||
lib_area_windows_x64_php_ext: | ||
runs-on: windows-2019 | ||
steps: | ||
- name: Setup MSVC | ||
uses: ilammy/[email protected] | ||
with: | ||
vsversion: 2019 | ||
arch: x64 | ||
|
||
- name: Set Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v2 | ||
|
||
- name: build php 8 extension | ||
run: | | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && .\build.cmd init | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && .\build.cmd php8 | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && dir . | ||
- name: package php extension | ||
run: | | ||
cd ${{ github.workspace }} && mkdir server\lsys-lib-area\build\target\example\data | ||
cd ${{ github.workspace }} && powershell -Command "Invoke-WebRequest -Uri 'https://github.com/shanliu/lsys/releases/download/v0.0.0/2023-7-area-code.csv.gz' -OutFile 'server\lsys-lib-area\build\target\example\data\2023-7-area-code.csv.gz'" | ||
cd ${{ github.workspace }} && powershell -Command "Invoke-WebRequest -Uri 'https://github.com/shanliu/lsys/releases/download/v0.0.0/2023-7-area-geo.csv.gz' -OutFile 'server\lsys-lib-area\build\target\example\data\2023-7-area-geo.csv.gz'" | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && .\build.cmd archive | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && .\build.cmd clear | ||
cd ${{ github.workspace }}\server\lsys-lib-area\wrappers\php\ && mv lsys_lib_area_php_ext.zip ..\..\..\..\ | ||
cd ${{ github.workspace }} && powershell -Command "Compress-Archive -Path '.\server\lsys-lib-area\*' -DestinationPath '.\lsys_lib_area_src.zip'" | ||
cd ${{ github.workspace }} && dir . | ||
- name: get current tag | ||
id: get_tag | ||
run: | | ||
$tag = $env:GITHUB_REF -replace 'refs/tags/', '' | ||
Write-Host "##[set-output name=tag;]$tag" | ||
- uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
artifacts: "lsys_lib_area_php_ext.zip,lsys_lib_area_src.zip" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.get_tag.outputs.tag }} | ||
prerelease: true | ||
tag: ${{ github.ref }} | ||
body: | | ||
lsys-lib-area crate for php(8.*)扩展,使用vs16(2019)编译 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
name: build lsys | ||
|
||
on: | ||
push: | ||
tags: | ||
- "v*.*.*" | ||
- "!v*.*.*-*" | ||
|
||
jobs: | ||
build_for_windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: set nodejs | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
|
||
- name: set rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: build release | ||
run: ./build.cmd assets zip | ||
|
||
- name: get current tag | ||
id: get_tag | ||
run: | | ||
$tag = $env:GITHUB_REF -replace 'refs/tags/', '' | ||
Write-Host "##[set-output name=tag;]$tag" | ||
- uses: ncipollo/release-action@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
artifacts: "lsys-for-windows.zip" | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
name: ${{ steps.get_tag.outputs.tag }} | ||
prerelease: true | ||
tag: ${{ github.ref }} | ||
body: | | ||
lsys for windows x64 下编译版本请下载 lsys-for-windows.zip | ||
其他系统请下载源码`Source code`编译 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,58 @@ | ||
name: check lsys server | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
paths: | ||
- 'server/**/*' | ||
- '!server/**/*.md' | ||
- '!server/**/*.MD' | ||
- '!server/**/*.cmd' | ||
- '!server/**/.gitignore' | ||
- '.github/workflows/check_server.yml' | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
|
||
jobs: | ||
|
||
server_check: | ||
runs-on: ubuntu-latest | ||
services: | ||
redis: | ||
image: redis | ||
ports: | ||
- 6379:6379 | ||
options: --entrypoint redis-server | ||
mysql: | ||
image: mysql:5.7 | ||
env: | ||
MYSQL_ROOT_PASSWORD: "000" | ||
MYSQL_DATABASE: test2 | ||
ports: | ||
- 3306:3306 | ||
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | ||
|
||
steps: | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: init | ||
run: | | ||
cd ${{ github.workspace }}/server && bash ./sql_merge.sh && mysql -h 127.0.0.1 -u root -p000 test2 < ./tables.sql | ||
- name: build server rust | ||
working-directory: ./server | ||
run: cargo build --verbose | ||
|
||
- name: init assest | ||
working-directory: ./server/lsys-lib-area | ||
run: | | ||
curl -L -o "./data/2023-7-area-code.csv.gz" "https://github.com/shanliu/lsys/releases/download/v0.0.0/2023-7-area-code.csv.gz" | ||
curl -L -o "./data/2023-7-area-geo.csv.gz" "https://github.com/shanliu/lsys/releases/download/v0.0.0/2023-7-area-geo.csv.gz" | ||
- name: run server rust tests | ||
working-directory: ./server | ||
run: cargo test --verbose | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.