-
Notifications
You must be signed in to change notification settings - Fork 147
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #917 from gluon-lang/workflows
Switch to github actions
- Loading branch information
Showing
9 changed files
with
96 additions
and
19 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,26 @@ | ||
name: release | ||
on: | ||
push: | ||
tags: | ||
- '*' | ||
jobs: | ||
release: | ||
runs-on: ubuntu-latest | ||
- name: release | ||
uses: actions/create-release@v1 | ||
id: create_release | ||
with: | ||
draft: false | ||
prerelease: false | ||
release_name: ${{ steps.version.outputs.version }} | ||
tag_name: ${{ github.ref }} | ||
body_path: CHANGELOG.md | ||
env: | ||
GITHUB_TOKEN: ${{ github.token }} | ||
# Only run deployment on git tags | ||
- CURRENT_TAG=`git describe --exact-match --abbrev=0 --tags || true` | ||
- > | ||
if [[ $CURRENT_TAG != "" ]]; then | ||
export GIT_HASH=$(git rev-parse HEAD) | ||
sh scripts/before_deploy.sh | ||
fi |
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,52 @@ | ||
name: ci | ||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- master | ||
jobs: | ||
test: | ||
name: test | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
matrix: | ||
build: [stable] | ||
include: | ||
- build: stable | ||
os: ubuntu-latest | ||
rust: stable | ||
env: | ||
CRATE_NAME: gluon | ||
CARGO_INCREMENTAL: 0 # Incremental compilation is slower and bloats the cache | ||
RUST_BACKTRACE: 1 | ||
RUSTC_WRAPPER: sccache | ||
SCCACHE_CACHE_SIZE: 500M | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
- name: Install Rust | ||
uses: hecrj/setup-rust-action@v1 | ||
with: | ||
rust-version: ${{ matrix.rust }} | ||
- uses: Swatinem/rust-cache@v1 | ||
- run: echo "$HOME/bin" >> $GITHUB_PATH | ||
- run: mkdir -p $HOME/bin | ||
- run: ./scripts/install_sccache.sh $TARGET | ||
- run: sh scripts/install_cross.sh | ||
- run: source ~/.cargo/env || true | ||
- run: ./scripts/install_mdbook.sh $TARGET | ||
- name: Run tests | ||
run: > | ||
if [ ! -z $DISABLE_TESTS ]; then | ||
return | ||
elif [[ -z ${WASM+set} ]]; then | ||
mdbook build book | ||
./scripts/travis.sh | ||
if ! git diff-index HEAD --; then | ||
echo "Detected changes in the source after running tests" | ||
exit 1 | ||
fi | ||
else | ||
rustup target add wasm32-unknown-unknown | ||
cargo check --target wasm32-unknown-unknown -p gluon_c-api | ||
fi |
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