-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add test running fix on Add content type Try android binary build Add mac builder Fix name Add cli for macos Change stat for mac debug android Test mac and android fix Test binaries Fix inlining Echo test Tweak curl Fix content type
- Loading branch information
Showing
2 changed files
with
84 additions
and
0 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,69 @@ | ||
name: Build Binaries | ||
on: | ||
release: | ||
types: # This configuration does not affect the page_build event above | ||
- created | ||
jobs: | ||
build_for_mac: | ||
name: MacOS | ||
runs-on: macos-10.15 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- name: Rename binary | ||
run: mv target/release/flydb flydb-macos64 | ||
- name: Upload to release | ||
run: | | ||
curl \ | ||
-f \ | ||
-sSL \ | ||
-XPOST \ | ||
-H "Authorization: token $GITHUB_TOKEN" \ | ||
-H "Content-Length: $(stat -f%z flydb-macos64)" \ | ||
-H "Content-Type: application/octet-stream" \ | ||
--upload-file "flydb-macos64" \ | ||
"https://uploads.github.com/repos/$GITHUB_REPOSITORY/releases/$(jq --raw-output '.release.id' $GITHUB_EVENT_PATH)/assets?name=flydb-macos64" | ||
build_for_android: | ||
name: Android | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
target: aarch64-linux-android | ||
override: true | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
use-cross: true | ||
command: build | ||
args: --release --target aarch64-linux-android | ||
- name: Rename binary | ||
run: mv target/aarch64-linux-android/release/flydb flydb-linux-android | ||
- name: Upload to release | ||
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262 | ||
with: | ||
args: flydb-linux-android application/octet-stream | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
build_for_linux: | ||
name: Linux | ||
runs-on: ubuntu-18.04 | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- name: Rename binary | ||
run: mv target/release/flydb flydb-linux-amd64 | ||
- name: Upload to release | ||
uses: JasonEtco/upload-to-release@d648f1babf776de9cad881320bd9e9818fc3b262 | ||
with: | ||
args: flydb-linux-amd64 application/octet-stream | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
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,15 @@ | ||
name: Cargo Tests | ||
on: | ||
push: | ||
branches: | ||
- '**' | ||
jobs: | ||
build_and_test: | ||
name: FlyDB Server Tests | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@master | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
|