-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: add reusable workflows to build, test and release oceanbase-ce
- Loading branch information
Showing
9 changed files
with
267 additions
and
269 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
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
45 changes: 45 additions & 0 deletions
45
.github/workflows/reusable-build-and-test-oceanbase-ce.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 |
---|---|---|
@@ -0,0 +1,45 @@ | ||
name: build and test oceanbase-ce | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache_key: | ||
required: true | ||
type: string | ||
version: | ||
required: true | ||
type: string | ||
|
||
jobs: | ||
build: | ||
uses: ./.github/workflows/reusable-build-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
version: ${{ inputs.version }} | ||
|
||
test-slim: | ||
needs: build | ||
uses: ./.github/workflows/reusable-test-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
mode: slim | ||
port: 1234 | ||
test_password: 123456 | ||
init_sql: "USE test; | ||
CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); | ||
INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" | ||
|
||
test-mini: | ||
needs: build | ||
uses: ./.github/workflows/reusable-test-oceanbase-ce.yml | ||
with: | ||
cache_key: ${{ inputs.cache_key }} | ||
cluster_name: github-action | ||
mode: mini | ||
port: 1234 | ||
sys_password: 1234567 | ||
test_tenant: mini | ||
test_password: 7654321 | ||
init_sql: "USE test; | ||
CREATE TABLE user(id INT(10) PRIMARY KEY, name VARCHAR(20)); | ||
INSERT INTO user VALUES (1, 'tom'), (2, 'jerry');" |
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,49 @@ | ||
name: build oblogproxy-ce image | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
cache_key: | ||
required: true | ||
type: string | ||
version: | ||
required: false | ||
type: string | ||
|
||
jobs: | ||
build-oblogproxy-ce-image: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Free disk space on Ubuntu runner | ||
uses: kfir4444/free-disk-space@main | ||
with: | ||
tool-cache: false | ||
android: true | ||
dotnet: true | ||
haskell: true | ||
large-packages: true | ||
swap-storage: true | ||
|
||
- name: Print environment variables | ||
run: printenv | ||
|
||
- name: Check out repository code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up QEMU | ||
uses: docker/setup-qemu-action@v3 | ||
|
||
- name: Set up Docker Buildx | ||
uses: docker/setup-buildx-action@v3 | ||
|
||
- name: Build oblogproxy-ce image | ||
run: | | ||
cd oblogproxy-ce | ||
docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/amd64 -t oblogproxy-ce-amd64 --load --output type=docker,dest=./oblogproxy-ce-amd64.tar . | ||
docker buildx build --build-arg VERSION=${{ inputs.version }} --platform linux/arm64 -t oblogproxy-ce-arm64 --load --output type=docker,dest=./oblogproxy-ce-arm64.tar . | ||
- name: Upload artifact | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.cache_key }} | ||
path: oblogproxy-ce/oblogproxy-ce-**.tar |
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
Oops, something went wrong.