Skip to content

Commit

Permalink
refactor
Browse files Browse the repository at this point in the history
  • Loading branch information
ebin-mathews committed Jan 9, 2024
1 parent c884577 commit eab41bf
Show file tree
Hide file tree
Showing 4 changed files with 45 additions and 33 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/lint_build_test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: build

on:
pull_request:

jobs:
build_proxy_server:
runs-on: ubuntu-20.04-16c-64g
defaults:
run:
working-directory: ./proxy_server
steps:
- name: Checkout
uses: actions/checkout@v3
with:
submodules: recursive

- name: Sanity Check
run: |
cat /proc/cpuinfo
- name: Setup Rust
uses: ./.github/actions/setup-rust
with:
caller-workflow-name: test

- name: Clippy check
run: cargo clippy --all-features --all-targets --tests -- -D warnings

- name: Run tests
run: |
./run_proxy_server.sh && ./stop_proxy_server.sh
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ jobs:
with:
context: ./proxy_server
push: true
tags: jitolabs/block-engine-proxy-server:${{github.ref_name}}, jitolabs/block-engine-proxy-server:latest
tags: jitolabs/block-engine-proxy-server:${{github.ref_name}}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64,linux/x86_64
Expand Down
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: build
name: release

on:
pull_request:
push:
branches:
- master

jobs:
build_proxy_server:
release_proxy_server:
runs-on: ubuntu-20.04-16c-64g
defaults:
run:
Expand All @@ -30,19 +32,19 @@ jobs:
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2

# # see https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api
# - name: Login to Docker Hub
# uses: docker/login-action@v2
# with:
# username: ${{ secrets.DOCKERHUB_USER }}
# password: ${{ secrets.DOCKERHUB_PWD }}
# see https://docs.docker.com/build/ci/github-actions/cache/#cache-backend-api
- name: Login to Docker Hub
uses: docker/login-action@v2
with:
username: ${{ secrets.DOCKERHUB_USER }}
password: ${{ secrets.DOCKERHUB_PWD }}

- name: Build and push
uses: docker/build-push-action@v4
with:
context: ./proxy_server
push: true
tags: jitolabs/block-engine-proxy-server:${{github.sha}}
tags: jitolabs/block-engine-proxy-server:${{ github.sha }}, jitolabs/block-engine-proxy-server:latest
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/arm64,linux/x86_64
22 changes: 0 additions & 22 deletions .github/workflows/test.yml

This file was deleted.

0 comments on commit eab41bf

Please sign in to comment.