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

Add support for windows & mac build #591

Merged
merged 1 commit into from
Oct 26, 2022
Merged
Show file tree
Hide file tree
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
51 changes: 51 additions & 0 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: CCR Test Workflow
# This workflow is triggered on pull requests to main branch
on:
pull_request:
branches:
- '*'
push:
branches:
- '*'

# We build for all combinations but run tests only on one combination (linux & latest java)
jobs:
build:
continue-on-error: true
strategy:
matrix:
java:
- 11
- 17
# Job name
name: Run integration tests on linux with Java ${{ matrix.java }}
runs-on: ubuntu-latest
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
uses: actions/setup-java@v1
with:
java-version: ${{ matrix.java }}
# This step uses the checkout Github action: https://github.com/actions/checkout
- name: Checkout Branch
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
./gradlew clean release -D"build.snapshot=true"
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Uploads coverage
with:
fetch-depth: 2
uses: codecov/codecov-action@v1.2.1
32 changes: 10 additions & 22 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test and Build Workflow
name: Build Replication plugin
# This workflow is triggered on pull requests to main branch
on:
pull_request:
Expand All @@ -8,16 +8,21 @@ on:
branches:
- '*'

# We build for other platforms except linux which is already covered in build-and-test.
# Also, We're not running tests here as those are already covered with linux build.
jobs:
build:
continue-on-error: true
strategy:
matrix:
java:
- 11
- 17
os:
- windows-latest
- macos-latest
# Job name
name: Build Replication plugin
runs-on: ubuntu-latest
name: Java ${{ matrix.java }} On ${{ matrix.os }}
runs-on: ${{ matrix.os }}
steps:
# This step uses the setup-java Github action: https://github.com/actions/setup-java
- name: Set Up JDK ${{ matrix.java }}
Expand All @@ -29,21 +34,4 @@ jobs:
uses: actions/checkout@v2
- name: Build and run Replication tests
run: |
./gradlew clean release -Dbuild.snapshot=true
- name: Upload failed logs
uses: actions/upload-artifact@v2
if: failure()
with:
name: logs
path: |
build/testclusters/integTest-*/logs/*
build/testclusters/leaderCluster-*/logs/*
build/testclusters/followCluster-*/logs/*
- name: Create Artifact Path
run: |
mkdir -p cross-cluster-replication-artifacts
cp ./build/distributions/*.zip cross-cluster-replication-artifacts
- name: Uploads coverage
with:
fetch-depth: 2
uses: codecov/codecov-action@v1.2.1
./gradlew clean release -D"build.snapshot=true" -x test -x IntegTest