From 5fa90e3bd025bca4d16a4fe8197bfa51ee13b32d Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:14:09 +0200 Subject: [PATCH 01/10] github action --- .github/workflows/integration.yml | 49 +++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .github/workflows/integration.yml diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml new file mode 100644 index 00000000..6ea53019 --- /dev/null +++ b/.github/workflows/integration.yml @@ -0,0 +1,49 @@ +--- + +name: Integration + +env: + redis_version: 6.0.10 + +on: + push: + paths-ignore: + - 'docs/**' + - '*.md' + branches: + - master + - main + - '[0-9].[0-9]' + 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 -y make gcc-8 g++-8 libssl-dev + - name: build redis + uses: actions/checkout@v3 + with: + repository: redis/redis + path: redis + ref: ${{env.redis_version}} + + - name: build and install redis + working-directory: redis + run: | + make + sudo make install + + - name: run tests + run: | + make test From 0913be0ffc7204c70ff824fc908a9d9691bda5cc Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:16:01 +0200 Subject: [PATCH 02/10] on pr --- .github/workflows/integration.yml | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6ea53019..d092af5c 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -14,8 +14,12 @@ on: - master - main - '[0-9].[0-9]' - schedule: - - cron: '0 1 * * *' + pull_request: + branches: + - master + - main + schedule: + - cron: '0 1 * * *' jobs: build: From 9b63b9f6141df8441f49e8e35e6dfa39130273dd Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:18:56 +0200 Subject: [PATCH 03/10] package --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index d092af5c..e3086e00 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -34,7 +34,7 @@ jobs: - name: build redis run: | sudo apt-get update -q - sudo apt-get install -y make gcc-8 g++-8 libssl-dev + sudo apt-get install -qy make gcc g++ libssl-dev - name: build redis uses: actions/checkout@v3 with: From 3befdfd4d23ae7869ff89ba361f1bff07f5f41e3 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:23:43 +0200 Subject: [PATCH 04/10] tls --- .github/workflows/integration.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index e3086e00..20ab0561 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -35,8 +35,7 @@ jobs: run: | sudo apt-get update -q sudo apt-get install -qy make gcc g++ libssl-dev - - name: build redis - uses: actions/checkout@v3 + - uses: actions/checkout@v3 with: repository: redis/redis path: redis @@ -45,7 +44,7 @@ jobs: - name: build and install redis working-directory: redis run: | - make + make BUILD_TLS=yes sudo make install - name: run tests From 92dd0893fe0180504c6a2d50fed117c9dba9d080 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:33:29 +0200 Subject: [PATCH 05/10] snapshots, from jedis --- .circleci/config.yml | 181 ------------------------------ .github/workflows/integration.yml | 9 ++ .github/workflows/snapshot.yml | 42 +++++++ 3 files changed, 51 insertions(+), 181 deletions(-) delete mode 100644 .circleci/config.yml create mode 100644 .github/workflows/snapshot.yml 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 index 20ab0561..f7d326b7 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -50,3 +50,12 @@ jobs: - name: run tests run: | make test + - cache: + uses: actions/cache@v2 + with: + path: | + ~/.m2/repository + /var/cache/apt + - name: codecov + run: | + bash < (curl -s https://codecov.io/bash) 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}} From 8ff1e6fb702cfaec3ad881227e5faf533a73218e Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:36:51 +0200 Subject: [PATCH 06/10] syntax --- .github/workflows/integration.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f7d326b7..6ef3ec37 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -50,7 +50,7 @@ jobs: - name: run tests run: | make test - - cache: + - name: cache uses: actions/cache@v2 with: path: | From 1406226c8d2f46aaeb774c4943631e20f3b5d1fd Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:42:07 +0200 Subject: [PATCH 07/10] syntax --- .github/workflows/integration.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index 6ef3ec37..a9b523be 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -53,9 +53,9 @@ jobs: - name: cache uses: actions/cache@v2 with: - path: | - ~/.m2/repository - /var/cache/apt + path: | + ~/.m2/repository + /var/cache/apt - name: codecov run: | bash < (curl -s https://codecov.io/bash) From 3933dab5661cdb78ddbe5add1027316b3af7637e Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 12:52:16 +0200 Subject: [PATCH 08/10] cache key --- .github/workflows/integration.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index a9b523be..f9a794a1 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -53,6 +53,7 @@ jobs: - name: cache uses: actions/cache@v2 with: + key: spark-${{hashFiles('**/pom.xml')}} path: | ~/.m2/repository /var/cache/apt From 95a61989f5183b49bd977e5465aa8ef1a35e0934 Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 13:02:03 +0200 Subject: [PATCH 09/10] codecov removal fix --- .github/workflows/integration.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/integration.yml b/.github/workflows/integration.yml index f9a794a1..93735957 100644 --- a/.github/workflows/integration.yml +++ b/.github/workflows/integration.yml @@ -57,6 +57,3 @@ jobs: path: | ~/.m2/repository /var/cache/apt - - name: codecov - run: | - bash < (curl -s https://codecov.io/bash) From 270117ee78dfa6348315a5720717fac21b91cd0c Mon Sep 17 00:00:00 2001 From: "Chayim I. Kirshen" Date: Wed, 18 Jan 2023 13:02:20 +0200 Subject: [PATCH 10/10] settings file --- .circleci.settings.xml | 13 ------------- 1 file changed, 13 deletions(-) delete mode 100644 .circleci.settings.xml 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} - - -