Skip to content

Commit

Permalink
fix conflit
Browse files Browse the repository at this point in the history
  • Loading branch information
wuxianrong committed Dec 27, 2023
2 parents 09cca3b + d398355 commit 83a4559
Show file tree
Hide file tree
Showing 102 changed files with 8,475 additions and 855 deletions.
21 changes: 21 additions & 0 deletions .github/workflows/clean-cache.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Cleanup Caches By a Branch
on:
pull_request:
types:
- closed

jobs:
cleanup:
runs-on: ubuntu-latest
steps:
- name: Cleanup
run: |
gh extension install actions/gh-actions-cache
for cacheKey in $(gh actions-cache list -R $REPO -B $BRANCH -L 100 | cut -f 1 )
do
gh actions-cache delete $cacheKey -R $REPO -B $BRANCH --confirm
done
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
REPO: ${{ github.repository }}
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
4 changes: 2 additions & 2 deletions .github/workflows/codeql.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ name: "CodeQL"

on:
push:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
pull_request:
# The branches below must be a subset of the branches above
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
schedule:
- cron: '25 19 * * 6'

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/codis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Codis

on:
push:
branches: [ "unstable", "3.5.2", "*" ]
branches: [ "unstable", "3.5" ]
pull_request:
branches: [ "unstable", "3.5.2", "*" ]
branches: [ "unstable", "3.5" ]

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/operator.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,9 @@ name: Operator

on:
push:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
pull_request:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]

jobs:

Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/pika.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Pika

on:
push:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
pull_request:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]

env:
# Customize the CMake build type here (Release, Debug, RelWithDebInfo, etc.)
Expand Down Expand Up @@ -84,8 +84,10 @@ jobs:
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
cd ../tests/integration/
chmod +x integrate_test.sh
cd ../tools/pika_keys_analysis/
go test -v ./...
cd ../../tests/integration/
chmod +x integrate_test.sh
sh integrate_test.sh
build_on_centos:
Expand Down Expand Up @@ -152,8 +154,10 @@ jobs:
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
cd ../tests/integration/
chmod +x integrate_test.sh
cd ../tools/pika_keys_analysis/
go test -v ./...
cd ../../tests/integration/
chmod +x integrate_test.sh
sh integrate_test.sh
build_on_macos:
Expand Down Expand Up @@ -210,8 +214,10 @@ jobs:
- name: Run Go E2E Tests
working-directory: ${{ github.workspace }}/build
run: |
cd ../tests/integration/
chmod +x integrate_test.sh
cd ../tools/pika_keys_analysis/
go test -v ./...
cd ../../tests/integration/
chmod +x integrate_test.sh
sh integrate_test.sh
build_pika_image:
Expand Down
13 changes: 6 additions & 7 deletions .github/workflows/publish_nightly_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,21 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: pikadb/pika-dev-nightly
tags: |
type=schedule,prefix={{branch}},pattern={{date 'YYYYMMDD'}}
- name: Build and push Docker image
timeout-minutes: 1440
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
Expand All @@ -56,21 +56,21 @@ jobs:

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: pikadb/codis-dev-nightly
tags: |
type=schedule,prefix={{branch}},pattern={{date 'YYYYMMDD'}}
- name: Build and push Docker image
timeout-minutes: 1440
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
Expand All @@ -81,4 +81,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

17 changes: 8 additions & 9 deletions .github/workflows/publish_release_docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,25 +12,25 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: pikadb/pika

- name: Build and push Docker image
timeout-minutes: 1440
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
Expand All @@ -48,25 +48,25 @@ jobs:
steps:
- name: Check out the repo
uses: actions/checkout@v3

- name: Set up QEMU
uses: docker/setup-qemu-action@v2

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

- name: Log in to Docker Hub
uses: docker/login-action@f4ef78c080cd8ba55a85445d5b36e214a81df20a
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}

- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@9ec57ed1fcdbf14dcef7dfbe97b2010124a938b7
with:
images: pikadb/codis

- name: Build and push Docker image
timeout-minutes: 1440
uses: docker/build-push-action@3b5e8027fcad23fda98b2e3ac259d8d67585f671
Expand All @@ -77,4 +77,3 @@ jobs:
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}

110 changes: 110 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,110 @@
name: Release

on:
push:
tags:
- "v*.*.*"

env:
BUILD_TYPE: Release

jobs:
build:
name: Build binary
strategy:
matrix:
include:
- arch: x86_64-unknown-linux-gnu
os: ubuntu-latest
file_name: ${{ github.event.repository.name }}-${{ github.ref_name }}-linux-amd64
file_ext: .tar.gz
- arch: aarch64-unknown-linux-gnu
os: ubuntu-latest
file_name: ${{ github.event.repository.name }}-${{ github.ref_name }}-linux-arm64
file_ext: .tar.gz
- arch: x86_64-apple-darwin
os: macos-latest
file_name: ${{ github.event.repository.name }}-${{ github.ref_name }}-darwin-amd64
file_ext: .tar.gz
- arch: aarch64-apple-darwin
os: macos-latest
file_name: ${{ github.event.repository.name }}-${{ github.ref_name }}-darwin-arm64
file_ext: .tar.gz

runs-on: ${{ matrix.os }}

steps:
- name: Checkout sources
uses: actions/checkout@v4

- name: Install Deps - linux
if: contains(matrix.arch, 'linux')
run: |
sudo apt-get install -y autoconf libprotobuf-dev protobuf-compiler
sudo apt-get install -y clang-tidy-12
- name: Install Deps - darwin
if: contains(matrix.os, 'macos')
run: |
brew update
brew install --overwrite python autoconf protobuf llvm wget git
brew install gcc@10 automake cmake make binutils
- name: Configure CMake - linux
if: contains(matrix.arch, 'linux')
run: cmake -B build -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }} -DUSE_PIKA_TOOLS=ON -DCMAKE_CXX_FLAGS="-s" -DCMAKE_EXE_LINKER_FLAGS="-s"

- name: Configure CMake - darwin
if: contains(matrix.os, 'macos')
run: |
export CC=/usr/local/opt/gcc@10/bin/gcc-10
cmake -B build -DCMAKE_C_COMPILER=/usr/local/opt/gcc@10/bin/gcc-10 -DUSE_PIKA_TOOLS=ON -DCMAKE_BUILD_TYPE=${{ env.BUILD_TYPE }}
- name: Cache Build - linux
if: contains(matrix.arch, 'linux')
uses: actions/cache@v3
id: cache-ubuntu
with:
key: ${{ runner.os }}-build-ubuntu-${{ hashFiles('**/CMakeLists.txt') }}
path: |
${{ github.workspace }}/buildtrees
${{ github.workspace }}/deps
- name: Build
run: cmake --build build --config ${{ env.BUILD_TYPE }}

- name: Calculate checksum and rename binary
shell: bash
run: |
cd build/
chmod +x ${{ github.event.repository.name }}
tar -zcvf ${{ matrix.file_name }}${{ matrix.file_ext }} ${{ github.event.repository.name }}
echo $(shasum -a 256 ${{ matrix.file_name }}${{ matrix.file_ext }} | cut -f1 -d' ') > ${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum
- name: Upload artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.file_name }}${{ matrix.file_ext }}
path: build/${{ matrix.file_name }}${{ matrix.file_ext }}

- name: Upload checksum of artifacts
uses: actions/upload-artifact@v3
with:
name: ${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum
path: build/${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum

release:
name: Release artifacts
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Download artifacts
uses: actions/download-artifact@v3

- name: Publish release
uses: softprops/action-gh-release@v1
with:
name: "Release ${{ github.ref_name }}"
generate_release_notes: true
files: |
**/${{ github.event.repository.name }}-*
4 changes: 2 additions & 2 deletions .github/workflows/tools_go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@ name: Tools_go_build

on:
push:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
paths:
- 'tools/**'
pull_request:
branches: [ "unstable", "3.5.2", "*"]
branches: [ "unstable", "3.5" ]
paths:
- 'tools/**'

Expand Down
4 changes: 2 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -632,9 +632,9 @@ ExternalProject_Add(rocksdb

ExternalProject_Add(rediscache
URL
https://github.com/pikiwidb/rediscache/archive/refs/tags/v1.0.5.tar.gz
https://github.com/pikiwidb/rediscache/archive/refs/tags/v1.0.7.tar.gz
URL_HASH
MD5=99e4d0bde20811a6058a6aa482c18711
MD5=02c8aadc018dd8d4d3803cc420d1d75b
DOWNLOAD_NO_PROGRESS
1
UPDATE_COMMAND
Expand Down
Loading

0 comments on commit 83a4559

Please sign in to comment.