Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove examples separate job #20

Merged
merged 3 commits into from
Jan 12, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
45 changes: 6 additions & 39 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ on:
tags: ["v*"]
pull_request:
branches: ["*"]
# release:
# types: [published]

env:
JAVA_OPTS: "-Xmx2G"
Expand Down Expand Up @@ -36,7 +34,7 @@ jobs:
run: ./build/setup_unix.sh

- name: Build native binary
run: sbt bindgen/nativeLink
run: sbt --client bindgen/nativeLink

- name: Upload artifacts
uses: actions/upload-artifact@master
Expand All @@ -45,44 +43,13 @@ jobs:
name: ${{ matrix.uploaded_filename }}

- name: Run tests
run: sbt ci

examples:
needs: [build]
name: Examples
strategy:
fail-fast: false
matrix:
include:
- os: macos-latest
binary: sn-bindgen-x86_64-apple-darwin
- os: ubuntu-latest
binary: sn-bindgen-x86_64-pc-linux
runs-on: ${{ matrix.os }}
env:
BINARY: /tmp/binaries/${{ matrix.binary }}/bindgen-out
steps:
- uses: actions/checkout@v2
- uses: coursier/cache-action@v6
- uses: olafurpg/setup-scala@v13
with:
java-version: graalvm-ce-java17

- name: Download binaries
uses: actions/download-artifact@v2
with:
path: /tmp/binaries

- name: Setup
run: ./build/setup_unix.sh

- name: Generate and compile examples
run: |
chmod +x $BINARY
sbt examples/compile
run: sbt --client ci

- name: Compile examples
run: sbt --client examples/compile

release:
needs: [build, examples]
needs: [build]
name: Release
if: startsWith(github.ref, 'refs/tags/v') || (github.ref == 'refs/heads/main')
runs-on: ubuntu-latest
Expand Down