-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: add macos target and publish binaries
- create and test builds for linux + macos - publish built csml_server binaries to release
- Loading branch information
Showing
10 changed files
with
185 additions
and
27 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 |
---|---|---|
|
@@ -2,6 +2,6 @@ Fixes # | |
|
||
## Proposed Changes | ||
|
||
- | ||
- | ||
- | ||
- | ||
- | ||
- |
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,55 @@ | ||
name: Publish binaries | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ${{ matrix.os }} | ||
env: | ||
MACOSX_DEPLOYMENT_TARGET: 10.11 | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, macos-latest] | ||
include: | ||
- os: ubuntu-latest | ||
asset_name: csml-server-linux-amd64 | ||
- os: macos-latest | ||
asset_name: csml-server-macos-amd64 | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
# for some reason cache does not work properly with macos builds | ||
- name: Cache Cargo | ||
if: matrix.os != 'macos-latest' | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-csml-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Build Server | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --verbose --manifest-path=csml_server/Cargo.toml --features csml_engine/mongo,csml_engine/dynamo --release | ||
|
||
- name: Upload binary to release | ||
uses: svenstaro/upload-release-action@2.2.0 | ||
with: | ||
repo_token: ${{ secrets.GITHUB_TOKEN }} | ||
file: target/release/csml_server | ||
asset_name: ${{ matrix.asset_name }} | ||
tag: ${{ github.ref }} | ||
overwrite: true |
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,47 @@ | ||
name: Publish crates.io | ||
|
||
on: | ||
release: | ||
types: [published] | ||
|
||
jobs: | ||
publish: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Cache Cargo | ||
uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
target | ||
key: ${{ runner.os }}-csml-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- name: Install Rust Stable | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
|
||
- name: Login | ||
run: cargo login ${CRATES_IO_TOKEN} | ||
env: | ||
CRATES_IO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }} | ||
|
||
- name: Publish interpreter | ||
run: cargo publish --manifest-path csml_interpreter/Cargo.toml --all-features | ||
|
||
# crates.io may say that the interpreter is not available | ||
# if we don't wait before we build the engine | ||
- name: Sleep | ||
uses: jakejarvis/wait-action@master | ||
with: | ||
time: '60s' | ||
|
||
- name: Publish engine | ||
run: cargo publish --manifest-path csml_engine/Cargo.toml --all-features | ||
|
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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
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
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 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