diff --git a/.circleci.settings.xml b/.circleci.settings.xml deleted file mode 100644 index b3e253ac..00000000 --- a/.circleci.settings.xml +++ /dev/null @@ -1,13 +0,0 @@ - - - - ossrh - ${env.OSSH_USERNAME} - ${env.OSSH_PASSWORD} - - - gpg.passphrase - ${env.GPG_PASSPHRASE} - - - diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 544ccacc..00000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,181 +0,0 @@ -version: 2.1 - -commands: - - abort_for_docs: - steps: - - run: - name: Avoid tests for docs - command: | - if [[ $CIRCLE_BRANCH == *docs ]]; then - echo "Identifies as documents PR, no testing required" - circleci step halt - fi - - abort_for_noci: - steps: - - run: - name: Ignore CI for specific branches - command: | - if [[ $CIRCLE_BRANCH == *noci ]]; then - echo "Identifies as actively ignoring CI, no testing required." - circleci step halt - fi - - early_return_for_forked_pull_requests: - description: >- - If this build is from a fork, stop executing the current job and return success. - This is useful to avoid steps that will fail due to missing credentials. - steps: - - run: - name: Early return if this build is from a forked PR - command: | - if [ -n "$CIRCLE_PR_NUMBER" ]; then - echo "Nothing to do for forked PRs, so marking this step successful" - circleci step halt - fi - -jobs: - - build: - docker: - - image: circleci/openjdk:8-jdk - - environment: - JVM_OPTS: -Xmx3200m - TERM: dumb - - steps: - - abort_for_docs - - abort_for_noci - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - spark-redis-{{ checksum "pom.xml" }} - - - run: mvn dependency:go-offline - - - run: - name: install Redis - command: | - sudo apt-get -y update - sudo apt-get install -y libssl-dev - wget http://download.redis.io/releases/redis-6.0.10.tar.gz - tar -xzvf redis-6.0.10.tar.gz - make -C redis-6.0.10 -j`nproc` BUILD_TLS=yes - export PATH=$PWD/redis-6.0.10/src:$PATH - - - run: - name: Run Test - command: | - export PATH=$PWD/redis-6.0.10/src:$PATH - make test - - - run: - name: gracefully kill redis - command: | - sleep 5s # let redis exit gracefully (we use kill, not kill -9 in makefile) - ps aux | grep redis - - - run: - name: Run Test with scala 2.12 - command: | - export PATH=$PWD/redis-6.0.10/src:$PATH - make test - - - save_cache: - paths: - - ~/.m2 - key: spark-redis-{{ checksum "pom.xml" }} - - - early_return_for_forked_pull_requests - - - run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t ${CODECOV_TOKEN} - - build-and-publish: - docker: - - image: circleci/openjdk:8-jdk - - environment: - JVM_OPTS: -Xmx3200m - TERM: dumb - - steps: - - abort_for_docs - - abort_for_noci - - checkout - - # Download and cache dependencies - - restore_cache: - keys: - - spark-redis-{{ checksum "pom.xml" }} - - - run: mvn dependency:go-offline - - - run: - name: install Redis - command: | - sudo apt-get -y update - sudo apt-get install -y libssl-dev - wget http://download.redis.io/releases/redis-6.0.10.tar.gz - tar -xzvf redis-6.0.10.tar.gz - make -C redis-6.0.10 -j`nproc` BUILD_TLS=yes - export PATH=$PWD/redis-6.0.10/src:$PATH - - - run: - name: Run Test - command: | - export PATH=$PWD/redis-6.0.10/src:$PATH - make test - - - run: - name: gracefully kill redis - command: | - sleep 5s # let redis exit gracefully (we use kill, not kill -9 in makefile) - ps aux | grep redis - - - run: - name: Run Test with scala 2.12 - command: | - export PATH=$PWD/redis-6.0.10/src:$PATH - make test - - - save_cache: - paths: - - ~/.m2 - key: spark-redis-{{ checksum "pom.xml" }} - - - early_return_for_forked_pull_requests - - - run: bash <(curl -s https://raw.githubusercontent.com/codecov/codecov-bash/master/codecov) -t ${CODECOV_TOKEN} - - - run: mvn -s .circleci.settings.xml -DskipTests deploy - -on-master: &on-master - filters: - branches: - only: master - tags: - ignore: /.*/ - -not-on-master: ¬-on-master - filters: - branches: - ignore: master - tags: - ignore: /.*/ - -workflows: - commit: - jobs: - - build: - <<: *not-on-master - context: - - common - - build-and-publish: - <<: *on-master - context: - - common - diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..93735957 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,59 @@ +--- + +name: Integration + +env: + redis_version: 6.0.10 + +on: + push: + paths-ignore: + - 'docs/**' + - '*.md' + branches: + - master + - main + - '[0-9].[0-9]' + pull_request: + branches: + - master + - main + schedule: + - cron: '0 1 * * *' + +jobs: + build: + name: Build and Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + - name: build redis + run: | + sudo apt-get update -q + sudo apt-get install -qy make gcc g++ libssl-dev + - uses: actions/checkout@v3 + with: + repository: redis/redis + path: redis + ref: ${{env.redis_version}} + + - name: build and install redis + working-directory: redis + run: | + make BUILD_TLS=yes + sudo make install + + - name: run tests + run: | + make test + - name: cache + uses: actions/cache@v2 + with: + key: spark-${{hashFiles('**/pom.xml')}} + path: | + ~/.m2/repository + /var/cache/apt diff --git a/.github/workflows/snapshot.yml b/.github/workflows/snapshot.yml new file mode 100644 index 00000000..6c8ad1a9 --- /dev/null +++ b/.github/workflows/snapshot.yml @@ -0,0 +1,42 @@ +--- + +name: Publish Snapshot + +on: + push: + branches: + - master + - '[0-9].[0-9]' + +jobs: + + snapshot: + name: Deploy Snapshot + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: Set up publishing to maven central + uses: actions/setup-java@v2 + with: + java-version: '8' + distribution: 'temurin' + server-id: ossrh + server-username: MAVEN_USERNAME + server-password: MAVEN_PASSWORD + - name: Cache dependencies + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + /var/cache/apt + key: jedis-${{hashFiles('**/pom.xml')}} + - name: mvn offline + run: | + mvn -q dependency:go-offline + - name: deploy + run: | + mvn --no-transfer-progress \ + -DskipTests deploy + env: + MAVEN_USERNAME: ${{secrets.OSSH_USERNAME}} + MAVEN_PASSWORD: ${{secrets.OSSH_TOKEN}}