-
Notifications
You must be signed in to change notification settings - Fork 10
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
7 changed files
with
104 additions
and
20 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,53 @@ | ||
name: CI | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
windows: | ||
runs-on: windows-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }} | ||
shell: bash | ||
- run: ci/build.bash cargo ${{ matrix.target }} | ||
shell: bash | ||
- run: ci/test.bash cargo ${{ matrix.target }} | ||
shell: bash | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
channel: [stable] | ||
target: | ||
- x86_64-pc-windows-msvc | ||
- x86_64-pc-windows-gnu | ||
|
||
macos: | ||
runs-on: macos-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }} | ||
- run: ci/build.bash cargo ${{ matrix.target }} | ||
- run: ci/test.bash cargo ${{ matrix.target }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
channel: [stable] | ||
target: | ||
- x86_64-apple-darwin | ||
|
||
linux: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- run: ci/set_rust_version.bash ${{ matrix.channel }} ${{ matrix.target }} | ||
- run: ci/build.bash cargo ${{ matrix.target }} | ||
- run: ci/test.bash cargo ${{ matrix.target }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
channel: [stable] | ||
target: | ||
- x86_64-unknown-linux-gnu |
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,23 @@ | ||
#!/usr/bin/env bash | ||
# Script for building your rust projects. | ||
set -e | ||
|
||
source ci/common.bash | ||
|
||
# $1 {path} = Path to cross/cargo executable | ||
CROSS=$1 | ||
# $2 {string} = <Target Triple> | ||
TARGET_TRIPLE=$2 | ||
# $3 {boolean} = Whether or not building for release or not. | ||
RELEASE_BUILD=$3 | ||
|
||
required_arg $CROSS 'CROSS' | ||
required_arg $TARGET_TRIPLE '<Target Triple>' | ||
|
||
if [ -z "$RELEASE_BUILD" ]; then | ||
$CROSS build --target $TARGET_TRIPLE --workspace | ||
$CROSS build --target $TARGET_TRIPLE --all-features --workspace | ||
else | ||
$CROSS build --target $TARGET_TRIPLE --all-features --release --workspace | ||
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,6 @@ | ||
required_arg() { | ||
if [ -z "$1" ]; then | ||
echo "Required argument $2 missing" | ||
exit 1 | ||
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,5 @@ | ||
#!/usr/bin/env bash | ||
set -e | ||
rustup update | ||
rustup default $1 | ||
rustup target add $2 |
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,16 @@ | ||
#!/usr/bin/env bash | ||
# Script for building your rust projects. | ||
set -e | ||
|
||
source ci/common.bash | ||
|
||
# $1 {path} = Path to cross/cargo executable | ||
CROSS=$1 | ||
# $2 {string} = <Target Triple> | ||
TARGET_TRIPLE=$2 | ||
|
||
required_arg $CROSS 'CROSS' | ||
required_arg $TARGET_TRIPLE '<Target Triple>' | ||
|
||
$CROSS test --target $TARGET_TRIPLE --workspace | ||
$CROSS build --target $TARGET_TRIPLE --all-features --workspace |
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