Skip to content

Commit

Permalink
Merge pull request #52 from zephyrchien/master
Browse files Browse the repository at this point in the history
Refactor Realm and Upgrade to Realm2
  • Loading branch information
zhboner committed Apr 15, 2022
2 parents b009a23 + 62799e6 commit bab4567
Show file tree
Hide file tree
Showing 63 changed files with 5,711 additions and 915 deletions.
38 changes: 0 additions & 38 deletions .github/ISSUE_TEMPLATE/bug_report.md

This file was deleted.

31 changes: 31 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: ci
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
clippy_check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
components: clippy
default: true
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
run_test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: nightly
default: true
override: true
- run: cargo test -v --no-fail-fast
101 changes: 101 additions & 0 deletions .github/workflows/cross_compile.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,101 @@
name: compile
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]

env:
CARGO_TERM_COLOR: always

jobs:
build-corss:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
output: realm
- target: x86_64-unknown-linux-musl
output: realm
- target: x86_64-linux-android
output: realm
- target: x86_64-pc-windows-gnu
output: realm.exe
- target: aarch64-unknown-linux-gnu
output: realm
- target: aarch64-unknown-linux-musl
output: realm
- target: aarch64-linux-android
output: realm
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: upload
uses: actions/upload-artifact@v2
with:
name: realm-${{ matrix.target }}
path: target/${{ matrix.target }}/release/${{ matrix.output }}
build-windows:
runs-on: windows-latest
strategy:
matrix:
target:
- x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: false
command: build
args: --release --target=${{ matrix.target }}
- name: upload
uses: actions/upload-artifact@v2
with:
name: realm-${{ matrix.target }}
path: target/${{ matrix.target }}/release/realm.exe
build-apple:
runs-on: macos-latest
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
- aarch64-apple-ios
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: upload
uses: actions/upload-artifact@v2
with:
name: realm-${{ matrix.target }}
path: target/${{ matrix.target }}/release/realm
34 changes: 0 additions & 34 deletions .github/workflows/relay.yml

This file was deleted.

118 changes: 118 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: release
on:
push:
tags:
- 'v*.*.*'

jobs:
release-corss:
runs-on: ubuntu-latest
strategy:
matrix:
include:
- target: x86_64-unknown-linux-gnu
output: realm
- target: x86_64-unknown-linux-musl
output: realm
- target: x86_64-linux-android
output: realm
- target: x86_64-pc-windows-gnu
output: realm.exe
- target: aarch64-unknown-linux-gnu
output: realm
- target: aarch64-unknown-linux-musl
output: realm
- target: aarch64-linux-android
output: realm
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: pack
run: |
mkdir -p release-${{ matrix.target }}
cd release-${{ matrix.target }}
tar -C ../target/${{ matrix.target }}/release -zcf realm-${{ matrix.target }}.tar.gz ${{ matrix.output }}
sha256sum realm-${{ matrix.target }}.tar.gz > realm-${{ matrix.target }}.sha256
- name: release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: release-${{ matrix.target }}/*
release-windows:
runs-on: windows-latest
strategy:
matrix:
target:
- x86_64-pc-windows-msvc
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: pack
run: |
mkdir -p release-${{ matrix.target }}
cd release-${{ matrix.target }}
tar -C ../target/${{ matrix.target }}/release/ -zcf realm-${{ matrix.target }}.tar.gz realm
openssl dgst -sha256 -r realm-${{ matrix.target }}.tar.gz > realm-${{ matrix.target }}.sha256
- name: release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: release-${{ matrix.target }}/*
release-apple:
runs-on: macos-latest
strategy:
matrix:
target:
- x86_64-apple-darwin
- aarch64-apple-darwin
- aarch64-apple-ios
steps:
- uses: actions/checkout@v2
- name: install toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: nightly
target: ${{ matrix.target }}
override: true
- name: compile
uses: actions-rs/cargo@v1
with:
use-cross: true
command: build
args: --release --target=${{ matrix.target }}
- name: pack
run: |
mkdir -p release-${{ matrix.target }}
cd release-${{ matrix.target }}
tar -C ../target/${{ matrix.target }}/release/ -zcf realm-${{ matrix.target }}.tar.gz realm
shasum -a 256 realm-${{ matrix.target }}.tar.gz > realm-${{ matrix.target }}.sha256
- name: release
uses: softprops/action-gh-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
files: release-${{ matrix.target }}/*
4 changes: 4 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[submodule "tokio-tfo"]
path = tokio-tfo
url = [email protected]:zephyrchien/tokio-tfo.git
branch = main
Loading

0 comments on commit bab4567

Please sign in to comment.