Skip to content

Commit

Permalink
separate yml
Browse files Browse the repository at this point in the history
  • Loading branch information
sakamoto-souta committed May 26, 2023
1 parent 6eeedfc commit 40c687c
Show file tree
Hide file tree
Showing 6 changed files with 587 additions and 532 deletions.
35 changes: 35 additions & 0 deletions .github/workflows/test-bts.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
on:
pull_request:
push:
branches:
- main
- "release/**"

env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

jobs:
small_test_bts:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

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

- name: Build bts with cache
uses: ./.github/actions/build_images_with_cache
with:
container-name: "small_bts"
cache-key: ${{ hashFiles('./packages/server/beaver_triple_service/**') }}
dockerfile-path: ./packages/server/beaver_triple_service/Dockerfile
builder-name: ${{ steps.buildx.outputs.name }}
target: "small"

- name: Run test in beaver_triple_service
run: make test t=./beaver_triple_service m=run
working-directory: ./scripts
82 changes: 82 additions & 0 deletions .github/workflows/test-cc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
on:
pull_request:
push:
branches:
- main
- "release/**"

env:
DOCKER_BUILDKIT: 1
COMPOSE_DOCKER_CLI_BUILD: 1

jobs:
small_test_cc:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Update .bazelrc for using remote cache
run: |
eval "echo \"$(cat ./.github/workflows/.bazelrc_for_ci)\"" >> ./packages/server/computation_container/.bazelrc
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

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

- name: Build cc with cache
uses: ./.github/actions/build_images_with_cache
with:
container-name: "small_cc"
cache-key: ${{ hashFiles('./packages/server/computation_container/**') }}
dockerfile-path: ./packages/server/computation_container/Dockerfile
builder-name: ${{ steps.buildx.outputs.name }}
target: "small_tmp"

- name: Run bazel test in computation_container
run: make test t=./computation_container m=run p=small
working-directory: ./scripts

medium_test_cc:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2

- name: Update .bazelrc for using remote cache
run: |
eval "echo \"$(cat ./.github/workflows/.bazelrc_for_ci)\"" >> ./packages/server/computation_container/.bazelrc
env:
BUILDBUDDY_API_KEY: ${{ secrets.BUILDBUDDY_API_KEY }}

- name: Log into registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.repository_owner }} --password-stdin

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

- name: Build cc with cache
uses: ./.github/actions/build_images_with_cache
with:
container-name: "medium_cc"
cache-key: ${{ hashFiles('./packages/server/computation_container/**') }}
dockerfile-path: ./packages/server/computation_container/Dockerfile
builder-name: ${{ steps.buildx.outputs.name }}
target: "medium"

- name: Build bts with cache
uses: ./.github/actions/build_images_with_cache
with:
container-name: "dev_bts"
cache-key: ${{ hashFiles('./packages/server/beaver_triple_service/**') }}
dockerfile-path: ./packages/server/beaver_triple_service/Dockerfile
builder-name: ${{ steps.buildx.outputs.name }}
target: "dev"

- name: Run bazel test in computation_container
run: make test t=./computation_container m=run p=medium
working-directory: ./scripts
Loading

0 comments on commit 40c687c

Please sign in to comment.