Skip to content

Commit

Permalink
Merge branch 'master' into doc-fix
Browse files Browse the repository at this point in the history
  • Loading branch information
bsbds authored Sep 2, 2024
2 parents 245560c + b6104b6 commit 7f38e45
Show file tree
Hide file tree
Showing 200 changed files with 8,451 additions and 9,614 deletions.
1 change: 1 addition & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@ retries = 0
slow-timeout = { period = "10s", terminate-after = 3 }
status-level = "all"
final-status-level = "slow"
fail-fast = true
8 changes: 2 additions & 6 deletions .github/workflows/benchmark.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,8 @@ jobs:
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: Setup sccache-cache
uses: mozilla-actions/[email protected]

call_build_xline:
name: Build and Upload Artifacts
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/build_env.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,11 @@
name: Build CI Env Image

on:
workflow_dispatch: {}
push:
paths:
- "ci/build-env.sh"
- "ci/Dockerfile"
workflow_dispatch:

jobs:
build_env:
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/build_xline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,9 @@ jobs:
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: Setup sccache-cache
uses: mozilla-actions/[email protected]

- name: Prepare release binaries
id: prepare_binaries
run: |
Expand Down
52 changes: 32 additions & 20 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,15 @@ jobs:
run:
shell: bash
env:
SCCACHE_GHA_ENABLED: "on"
container: ghcr.io/xline-kv/build-env:latest
SCCACHE_GHA_ENABLED: "true"
CARGO_INCREMENTAL: 0 # CI will compile all crates from beginning. So disable incremental compile may reduce compile target size.
container:
image: ghcr.io/xline-kv/build-env:latest
volumes:
- /usr/local/lib/android/:/tmp/android/
- /usr/share/dotnet:/tmp/dotnet
- /opt/ghc:/tmp/ghc
- /usr/lib/firefox:/tmp/firefox
strategy:
fail-fast: true
matrix:
Expand All @@ -24,26 +31,35 @@ jobs:
name: "Normal",
args: "",
rustflags: "",
test: "llvm-cov nextest --all-features --workspace --codecov --output-path codecov.info",
test: "llvm-cov nextest --all-features --workspace --codecov --output-path codecov.info && cargo test --doc",
}
- {
name: "Madsim",
args: "--package=simulation",
rustflags: "--cfg madsim",
test: "nextest run --package=simulation",
test: "nextest run --package=simulation && cargo test -p simulation --doc",
}
name: Tests ${{ matrix.config.name }}
steps:
- name: View free disk space
run: df -h /

- name: Setup sccache-cache
uses: mozilla-actions/[email protected]

- 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: Free Disk Space
run: |
rm -rf /tmp/android/* || true
rm -rf /tmp/dotnet/* || true
rm -rf /tmp/ghc/* || true
rm -rf /tmp/firefox/* || true
- name: View free disk space
run: df -h /

- name: Trailing spaces check
run: ci/scripts/check-trailing-spaces.sh
Expand All @@ -63,23 +79,23 @@ jobs:
- name: Workspace hack check
run: cargo hakari generate --diff && cargo hakari manage-deps --dry-run && cargo hakari verify

- run: sccache --zero-stats > /dev/null
- run: ${SCCACHE_PATH} --zero-stats > /dev/null

- name: Clippy ${{ matrix.config.name }}
env:
RUSTFLAGS: ${{ matrix.config.rustflags }}
run: cargo clippy ${{ matrix.config.args }} --all-targets --all-features -- -D warnings

- name: Sccache stats ${{ matrix.config.name }}
run: sccache --show-stats && sccache --zero-stats > /dev/null
run: ${SCCACHE_PATH} --show-stats && ${SCCACHE_PATH} --zero-stats > /dev/null

- name: Test ${{ matrix.config.name }}
env:
RUSTFLAGS: ${{ matrix.config.rustflags }}
run: cargo ${{ matrix.config.test }}

- name: Sccache stats ${{ matrix.config.name }}
run: sccache --show-stats
run: ${SCCACHE_PATH} --show-stats

- name: Upload coverage to Codecov
if: matrix.config.name == 'Normal'
Expand Down Expand Up @@ -112,7 +128,7 @@ jobs:
steps:
- uses: actions/checkout@v4
- name: Check Spelling
uses: crate-ci/typos@v1.23.1
uses: crate-ci/typos@v1.24.1

build:
name: Build
Expand All @@ -122,12 +138,8 @@ jobs:
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: Setup sccache-cache
uses: mozilla-actions/[email protected]

- name: Build xline image
run: |
Expand Down
14 changes: 5 additions & 9 deletions .github/workflows/validation.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,25 +16,21 @@ jobs:
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: Setup sccache-cache
uses: mozilla-actions/[email protected]

call_build_xline:
name: Build and Upload Artifacts
uses: ./.github/workflows/build_xline.yml
with:
docker_xline_image: 'ghcr.io/xline-kv/build-env:latest'
docker_xline_image: "ghcr.io/xline-kv/build-env:latest"
additional_setup_commands: |
sudo apt-get install -y --force-yes expect
ldd ./xline
ldd ./benchmark
cp ../fixtures/{private,public}.pem .
docker build . -t ghcr.io/xline-kv/xline:latest
docker pull gcr.io/etcd-development/etcd:v3.5.5
binaries: 'xline,benchmark'
script_name: 'validation_test.sh'
binaries: "xline,benchmark"
script_name: "validation_test.sh"
uploadLogs: true
2 changes: 2 additions & 0 deletions .mergify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ pull_request_rules:

- name: convert to draft
conditions:
- base = master
- -draft
- -label = "CI:fail"
- or:
Expand All @@ -46,6 +47,7 @@ pull_request_rules:

- name: convert to ready-to-review
conditions:
- base = master
- label = "CI:fail"
- draft
- check-success = "Tests Normal"
Expand Down
Loading

0 comments on commit 7f38e45

Please sign in to comment.