diff --git a/.circleci/config.yml b/.circleci/config.yml index 5f7f7b5d..e9c82267 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -40,7 +40,7 @@ commands: apt-get -q install -y git openssh-client curl ca-certificates make tar gzip bash <(curl -fsSL https://raw.githubusercontent.com/docker/docker-install/master/install.sh) - setup_remote_docker: - version: 20.10.2 + version: 20.10.14 docker_layer_caching: true checkout-all: @@ -56,6 +56,8 @@ commands: name: Setup automation command: | ./deps/readies/bin/getpy3 + python3 --version + python3 -m pip list install-prerequisites: parameters: @@ -72,10 +74,12 @@ commands: command: | ./sbin/system-setup.py bash -l -c "make info" + python3 -m pip list - run: name: Install Redis + shell: /bin/bash -l -eo pipefail command: | - bash -l -c "./deps/readies/bin/getredis -v \"<>\" --force <>" + ./deps/readies/bin/getredis -v <> --force <> redis-server --version build-steps: @@ -103,13 +107,16 @@ commands: - v3-dependencies-{{ arch }}-{{ checksum "Cargo.toml" }} - run: name: Check formatting - command: bash -l -c "make lint" + shell: /bin/bash -l -eo pipefail + command: make lint - run: name: Build debug - command: bash -l -c "make build DEBUG=1 <>" + shell: /bin/bash -l -eo pipefail + command: make build DEBUG=1 <> - run: name: Build release - command: bash -l -c "make build <>" + shell: /bin/bash -l -eo pipefail + command: make build <> - save_cache: key: v3-dependencies-{{ arch }}-{{ checksum "Cargo.toml" }} paths: @@ -117,7 +124,8 @@ commands: - "./target" - run: name: Run all tests - command: bash -l -c "make test" + shell: /bin/bash -l -eo pipefail + command: make test platforms-build-steps: parameters: @@ -130,18 +138,17 @@ commands: - setup-automation - run: name: Build for platform + shell: /bin/bash -l -eo pipefail command: | cd build/platforms make build OSNICK="<>" VERSION="$CIRCLE_TAG" BRANCH="$CIRCLE_BRANCH" TEST=1 SHOW=1 #---------------------------------------------------------------------------------------------------------------------------------- -#---------------------------------------------------------------------------------------------------------------------------------- - jobs: build: docker: - - image: redisfab/rmbuilder:6.2.5-x64-bullseye + - image: redisfab/rmbuilder:6.2.7-x64-bullseye steps: - build-steps @@ -149,8 +156,12 @@ jobs: parameters: platform: type: string - docker: - - image: debian:bullseye + # docker: + # - image: debian:bullseye + machine: + enabled: true + image: ubuntu-2004:202010-01 + resource_class: large steps: - platforms-build-steps: platform: <> @@ -234,6 +245,6 @@ workflows: <<: *on-integ-and-version-tags matrix: parameters: - platform: [focal, bionic, xenial, ol8, centos7, bullseye] + platform: [jammy, focal, bionic, xenial, ol8, centos7, bullseye] - build-macos: <<: *on-any-branch diff --git a/deps/readies b/deps/readies index 70cecff0..bd417531 160000 --- a/deps/readies +++ b/deps/readies @@ -1 +1 @@ -Subproject commit 70cecff050ff2157a691ac0733eff5877fade037 +Subproject commit bd417531c49a3cade00256d36ad9fe2f0cdddb99 diff --git a/examples/data_type.rs b/examples/data_type.rs index 69b94ad4..e196ab01 100644 --- a/examples/data_type.rs +++ b/examples/data_type.rs @@ -37,7 +37,7 @@ static MY_REDIS_TYPE: RedisType = RedisType::new( ); unsafe extern "C" fn free(value: *mut c_void) { - Box::from_raw(value.cast::()); + drop(Box::from_raw(value.cast::())); } fn alloc_set(ctx: &Context, args: Vec) -> RedisResult { diff --git a/sbin/setup b/sbin/setup new file mode 100755 index 00000000..ba869081 --- /dev/null +++ b/sbin/setup @@ -0,0 +1,10 @@ +#!/bin/bash + +PROGNAME="${BASH_SOURCE[0]}" +HERE="$(cd "$(dirname "$PROGNAME")" &>/dev/null && pwd)" +ROOT=$(cd $HERE/.. && pwd) +READIES=$ROOT/deps/readies +. $READIES/shibumi/defs + +$READIES/bin/getpy3 +$ROOT/sbin/system-setup.py diff --git a/sbin/system-setup.py b/sbin/system-setup.py index f9db078c..ae1a9428 100755 --- a/sbin/system-setup.py +++ b/sbin/system-setup.py @@ -25,13 +25,15 @@ def common_first(self): self.run("%s/bin/enable-utf8" % READIES) - self.run("%s/bin/getclang --modern" % READIES) if not self.has_command("rustc"): self.run("%s/bin/getrust" % READIES) if self.osnick == 'ol8': self.install('tar') self.run("%s/bin/getcmake" % READIES) + def linux_first(self): + self.run("%s/bin/getclang --modern" % READIES) + def debian_compat(self): self.run("%s/bin/getgcc" % READIES) diff --git a/src/key.rs b/src/key.rs index ef18f9a9..1743088c 100644 --- a/src/key.rs +++ b/src/key.rs @@ -33,7 +33,7 @@ pub enum KeyMode { #[derive(Debug)] pub struct RedisKey { ctx: *mut raw::RedisModuleCtx, - key_inner: *mut raw::RedisModuleKey, + pub key_inner: *mut raw::RedisModuleKey, } impl RedisKey {