-
Notifications
You must be signed in to change notification settings - Fork 76
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: iGxnon <[email protected]>
- Loading branch information
Showing
9 changed files
with
144 additions
and
160 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: cleanup caches by a branch | ||
name: Clean caches | ||
on: | ||
pull_request: | ||
types: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
.github/workflows/docker.yml → .github/workflows/docker_image.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Docker | ||
name: Push Docker Image | ||
|
||
on: | ||
workflow_dispatch: { } | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,5 @@ | ||
name: Merge Multi-platform Image Manifests | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Validate Changes | ||
|
||
on: | ||
merge_group: | ||
types: [checks_requested] | ||
|
||
env: | ||
XLINE_COMPILE_TOOLCHAIN: 1.70.0 | ||
|
||
jobs: | ||
test: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- { name: "Normal", args: "-- --nocapture", rustflags: "" } | ||
- { | ||
name: "Madsim", | ||
args: "--package=simulation -- --nocapture", | ||
rustflags: "--cfg madsim", | ||
} | ||
name: Test ${{ matrix.config.name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- run: sudo bash ./.github/scripts/install_deps.sh | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: ${{ env.XLINE_COMPILE_TOOLCHAIN }} | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "xline" | ||
- name: ${{ matrix.config.name }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: test | ||
args: ${{ matrix.config.args }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.config.rustflags }} | ||
|
||
validation: | ||
name: Validation | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- run: sudo bash ./.github/scripts/install_deps.sh | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: ${{ env.XLINE_COMPILE_TOOLCHAIN }} | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "xline" | ||
- run: cargo build --release --bin validation_lock_client --target x86_64-unknown-linux-gnu | ||
- uses: actions-rs/cargo@v1 | ||
with: | ||
command: build | ||
args: --release | ||
- run: | | ||
cd scripts | ||
cp ../target/release/{xline,benchmark} . | ||
cp ../target/x86_64-unknown-linux-gnu/release/validation_lock_client . | ||
cp ../xline-test-utils/{private,public}.pem . | ||
docker build . -t ghcr.io/xline-kv/xline:latest | ||
docker pull gcr.io/etcd-development/etcd:v3.5.5 | ||
bash ./validation_test.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,10 @@ | ||
name: CI | ||
name: Trivial Checks | ||
|
||
on: | ||
schedule: | ||
- cron: "00 19 * * *" # run ci periodically at 3 am | ||
pull_request: | ||
branches: [ master ] | ||
branches: [master] | ||
|
||
env: | ||
XLINE_COMPILE_TOOLCHAIN: 1.70.0 | ||
|
@@ -39,35 +39,6 @@ jobs: | |
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
check: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- { name: "Normal", args: "", rustflags: "" } | ||
- { name: "Madsim", args: "--package=simulation", rustflags: "--cfg madsim" } | ||
name: Check ${{ matrix.config.name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive | ||
- run: sudo bash ./.github/scripts/install_deps.sh | ||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: default | ||
toolchain: ${{ env.XLINE_COMPILE_TOOLCHAIN }} | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
with: | ||
shared-key: "xline" | ||
- name: ${{ matrix.config.name }} | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
args: ${{ matrix.config.args }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.config.rustflags }} | ||
|
||
fmt: | ||
name: Format | ||
runs-on: ubuntu-latest | ||
|
@@ -83,42 +54,76 @@ jobs: | |
command: fmt | ||
args: --all -- --check | ||
|
||
test: | ||
spell-check: | ||
name: Spell Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v2 | ||
- name: Check Spelling | ||
uses: crate-ci/typos@master | ||
|
||
cargo-sort: | ||
name: Check Crate Sort | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- { name: "Normal", args: "-- --nocapture", rustflags: "" } | ||
- { name: "Madsim", args: "--package=simulation -- --nocapture", rustflags: "--cfg madsim" } | ||
name: Test ${{ matrix.config.name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/[email protected] | ||
with: | ||
submodules: recursive | ||
- run: sudo bash ./.github/scripts/install_deps.sh | ||
- uses: actions-rs/toolchain@v1 | ||
crate: cargo-sort | ||
version: latest | ||
- run: cargo sort --check --workspace | ||
|
||
hakari-fix: | ||
name: Hakari fix | ||
runs-on: ubuntu-latest | ||
permissions: | ||
contents: write | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- name: Install cargo-hakari | ||
uses: taiki-e/install-action@v2 | ||
with: | ||
profile: default | ||
toolchain: ${{ env.XLINE_COMPILE_TOOLCHAIN }} | ||
override: true | ||
- uses: Swatinem/rust-cache@v2 | ||
tool: cargo-hakari | ||
- name: Hakari generate | ||
run: cargo hakari generate | ||
- name: Show diff | ||
run: git diff | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
shared-key: "xline" | ||
- name: ${{ matrix.config.name }} | ||
uses: actions-rs/cargo@v1 | ||
commit_message: "chore: fix workspace-hack" | ||
|
||
commit: | ||
name: Commit Message Validation | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name != 'schedule' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
command: test | ||
args: ${{ matrix.config.args }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.config.rustflags }} | ||
fetch-depth: 0 | ||
- run: git show-ref | ||
- uses: actions-rs/[email protected] | ||
with: | ||
crate: git-cz | ||
version: latest | ||
- name: Validate commit messages | ||
run: git-cz check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | ||
|
||
clippy: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
config: | ||
- { name: "Normal", args: "--all-targets --all-features -- -D warnings", rustflags: "" } | ||
- { name: "Madsim", args: "--package=simulation --all-targets --all-features -- -D warnings", rustflags: "--cfg madsim" } | ||
- { | ||
name: "Normal", | ||
args: "--all-targets --all-features -- -D warnings", | ||
rustflags: "", | ||
} | ||
- { | ||
name: "Madsim", | ||
args: "--package=simulation --all-targets --all-features -- -D warnings", | ||
rustflags: "--cfg madsim", | ||
} | ||
name: Clippy ${{ matrix.config.name }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
@@ -140,40 +145,3 @@ jobs: | |
args: ${{ matrix.config.args }} | ||
env: | ||
RUSTFLAGS: ${{ matrix.config.rustflags }} | ||
|
||
commit: | ||
name: Commit Message Validation | ||
runs-on: ubuntu-latest | ||
if: ${{ github.event_name != 'schedule' }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
- run: git show-ref | ||
- uses: actions-rs/[email protected] | ||
with: | ||
crate: git-cz | ||
version: latest | ||
- name: Validate commit messages | ||
run: git-cz check ${{ github.event.pull_request.base.sha }}..${{ github.event.pull_request.head.sha }} | ||
|
||
spell-check: | ||
name: Spell Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout Actions Repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Check Spelling | ||
uses: crate-ci/typos@master | ||
|
||
cargo-sort: | ||
name: Check Crate Sort | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: actions-rs/[email protected] | ||
with: | ||
crate: cargo-sort | ||
version: latest | ||
- run: cargo sort --check --workspace |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters