Skip to content

Commit

Permalink
Merge branch 'master' into dev
Browse files Browse the repository at this point in the history
  • Loading branch information
GFX9 authored Mar 27, 2024
2 parents 4b42d9b + 1cc2e19 commit 8ed8c85
Show file tree
Hide file tree
Showing 57 changed files with 2,263 additions and 272 deletions.
18 changes: 18 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
# Check for updates to GitHub Actions every day
interval: "daily"
# Allow up to 10 open pull requests for update github-actions
# 5 by default
# see https://docs.github.com/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#open-pull-requests-limit
open-pull-requests-limit: 10
- package-ecosystem: "cargo"
directory: "/"
schedule:
interval: "weekly"
labels:
- "dependencies"
open-pull-requests-limit: 10
4 changes: 2 additions & 2 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
submodules: recursive

- name: Configure sccache
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand All @@ -40,7 +40,7 @@ jobs:
docker pull datenlord/etcd:v3.5.5
bash ./benchmark.sh
- uses: actions/upload-artifact@v1
- uses: actions/upload-artifact@v4
with:
name: benchmark-output
path: scripts/out
14 changes: 7 additions & 7 deletions .github/workflows/docker_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
cross_image: aarch64-linux-gnu
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -36,10 +36,10 @@ jobs:
run: echo app_version=`git describe --tags --always` >> $GITHUB_OUTPUT

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

- name: Setup Custom Image for ${{ matrix.job.cross_image }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ci/cross
file: ci/cross/Dockerfile.${{ matrix.job.target }}
Expand Down Expand Up @@ -68,18 +68,18 @@ jobs:
mv ./target/${{ matrix.job.target }}/release/benchmark ./scripts
- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: xline-kv
password: ${{ secrets.GITHUB_TOKEN }}

- name: Build Docker Image
id: build_image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./scripts
platforms: ${{ matrix.job.platform }}
Expand All @@ -92,7 +92,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- name: Upload Digest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: digests
path: /tmp/digests/*
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/merge_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,16 +16,16 @@ jobs:
name: Merge Docker Image
steps:
- name: Download Digests
uses: actions/download-artifact@v3
uses: actions/download-artifact@v4
with:
name: digests
path: /tmp/digests

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

- name: Login to GHCR
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: xline-kv
Expand Down
94 changes: 93 additions & 1 deletion .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ jobs:
submodules: recursive

- name: Configure sccache
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand Down Expand Up @@ -109,3 +109,95 @@ jobs:
- uses: actions/checkout@v4
- name: Check Spelling
uses: crate-ci/typos@master

build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Configure sccache
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
core.exportVariable('ACTIONS_RUNTIME_TOKEN', process.env.ACTIONS_RUNTIME_TOKEN || '');
- name: Build xline image
run: |
docker run -q --rm -v $(pwd):/xline \
-e SCCACHE_GHA_ENABLED=on \
-e ACTIONS_CACHE_URL=${ACTIONS_CACHE_URL} \
-e ACTIONS_RUNTIME_TOKEN=${ACTIONS_RUNTIME_TOKEN} \
ghcr.io/xline-kv/build-env:latest \
cargo build --release --bin xline --bin benchmark --bin validation_lock_client
sudo apt-get install -y --force-yes expect
cd scripts
cp ../target/release/{xline,benchmark,validation_lock_client} .
ldd ./xline
ldd ./benchmark
cp ../fixtures/{private,public}.pem .
docker build . -t ghcr.io/xline-kv/xline:master
cd ..
pwd
mkdir -p _output
docker save -o _output/xline.tar ghcr.io/xline-kv/xline:master
ls _output
- uses: actions/upload-artifact@v4
with:
name: xline
path: _output/xline.tar

e2e:
name: e2e_kube
runs-on: ubuntu-latest
needs:
- build
strategy:
fail-fast: false
matrix:
k8s:
- v1.27.3
- v1.28.7
- v1.29.2
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
name: xline

- name: build kind node image with xline
run: |
docker build . -f ci/artifacts/kind-node-xline.Dockerfile -t ghcr.io/xline-kv/kind-node-xline:${{ matrix.k8s }}-master --build-arg K8S_VERSION=${{ matrix.k8s }}
- name: Create kubernetes cluster with kind
env:
K8S_VERSION: ${{ matrix.k8s }}
run: |
./ci/scripts/kind.sh
- name: Get cluster status
run: |
kubectl run test --image httpd:2
kubectl wait --timeout=1m --for=condition=ready pods test
kubectl get pods -A -owide
- name: Export logs
if: failure()
run: |
mkdir -p _artifacts
docker ps
kind export logs --loglevel=debug ./_artifacts/logs
ls _artifacts
- name: Upload logs
if: failure()
uses: actions/upload-artifact@v4
with:
name: xline-kind-log-${{ matrix.k8s }}-${{ github.run_id }}
path: ./_artifacts/logs
16 changes: 8 additions & 8 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ jobs:
steps:
- name: Create Release
id: create_release
uses: actions/create-release@v1.0.0
uses: actions/create-release@v1.1.4
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
Expand Down Expand Up @@ -53,7 +53,7 @@ jobs:
target: aarch64-apple-darwin
steps:
- name: Checkout
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
submodules: recursive

Expand All @@ -63,11 +63,11 @@ jobs:

- name: Set up Docker Buildx
if: matrix.job.cross_image
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Setup Custom Image for ${{ matrix.job.cross_image }}
if: matrix.job.cross_image
uses: docker/build-push-action@v2
uses: docker/build-push-action@v5
with:
context: ci/cross
file: ci/cross/Dockerfile.${{ matrix.job.target }}
Expand Down Expand Up @@ -114,11 +114,11 @@ jobs:
- name: Set up QEMU
if: startsWith(matrix.job.platform, 'linux/')
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Login to GHCR
if: startsWith(matrix.job.platform, 'linux/')
uses: docker/login-action@v2
uses: docker/login-action@v3
with:
registry: ghcr.io
username: xline-kv
Expand All @@ -127,7 +127,7 @@ jobs:
- name: Build Docker Image
if: startsWith(matrix.job.platform, 'linux/')
id: build_image
uses: docker/build-push-action@v4
uses: docker/build-push-action@v5
with:
context: ./scripts
platforms: ${{ matrix.job.platform }}
Expand All @@ -141,7 +141,7 @@ jobs:
touch "/tmp/digests/${digest#sha256:}"
- name: Upload Digest
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
if: startsWith(matrix.job.platform, 'linux/')
with:
name: digests
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
submodules: recursive

- name: Configure sccache
uses: actions/github-script@v6
uses: actions/github-script@v7
with:
script: |
core.exportVariable('ACTIONS_CACHE_URL', process.env.ACTIONS_CACHE_URL || '');
Expand All @@ -44,7 +44,7 @@ jobs:
bash ./validation_test.sh
- name: upload logs
if: failure() || cancelled()
uses: actions/upload-artifact@v1
uses: actions/upload-artifact@v4
with:
name: Xline logs
path: scripts/logs
Loading

0 comments on commit 8ed8c85

Please sign in to comment.