diff options
author | Ryan Geary <rtgnj42@gmail.com> | 2021-07-12 21:19:06 -0400 |
---|---|---|
committer | Ryan Geary <rtgnj42@gmail.com> | 2021-07-12 21:22:40 -0400 |
commit | e31a1f1c04c5c887d0dc9eb8deda91c45bda3984 (patch) | |
tree | d4e5204edf77fa4cc9d4e673ec9f5e313be4876c | |
parent | 3f147da84c1d3d824b84d6473361746e91664a1e (diff) |
Update github workflows
-rw-r--r-- | .github/workflows/release.yml | 33 | ||||
-rw-r--r-- | .github/workflows/rust.yml | 12 |
2 files changed, 37 insertions, 8 deletions
diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 824e2c3..3af7452 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -16,12 +16,20 @@ jobs: - name: Check style run: cargo fmt -- --check - - name: Build - run: cargo build --verbose --release - - - name: Run tests + - name: Run unit tests run: cargo test --verbose + - name: Rust end-to-end test + run: test/e2e_test.sh + + - name: Build x86_64-unknown-linux-gnu + run: cargo build --verbose --release --target x86_64-unknown-linux-gnu + + - name: Build x86_64-unknown-linux-musl + run: | + rustup target add x86_64-unknown-linux-musl + cargo build --verbose --release --target x86_64-unknown-linux-musl + - name: Create GitHub release id: create-release uses: actions/create-release@v1 @@ -35,14 +43,25 @@ jobs: prerelease: false - name: Upload binary to GitHub release - id: upload-release-asset + id: upload-x86_64-unknown-linux-gnu-release-asset + uses: actions/upload-release-asset@v1.0.1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + upload_url: ${{ steps.create-release.outputs.upload_url }} + asset_path: target/x86_64-unknown-linux-gnu/release/choose + asset_name: choose-x86_64-unknown-linux-gnu + asset_content_type: application/raw + + - name: Upload musl binary to GitHub release + id: upload-x86_64-unknown-linux-musl-release-asset uses: actions/upload-release-asset@v1.0.1 env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} with: upload_url: ${{ steps.create-release.outputs.upload_url }} - asset_path: target/release/choose - asset_name: choose + asset_path: target/x86_64-unknown-linux-musl/release/choose + asset_name: choose-x86_64-unknown-linux-musl asset_content_type: application/raw - name: Create crates.io release diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 42cd07d..fcb1ab8 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -16,9 +16,19 @@ jobs: steps: - uses: actions/checkout@v2 + - name: Check style run: cargo fmt -- --check + + # this will report success even if there are warnings, and should be manually checked for now + - name: Lint + run: cargo clippy + - name: Build run: cargo build --verbose - - name: Run tests + + - name: Run unit tests run: cargo test --verbose + + - name: Run end-to-end tests + run: test/e2e_test.sh |