Skip to content

Commit

Permalink
chore: add check-size workflows (#6)
Browse files Browse the repository at this point in the history
Signed-off-by: Gaius <[email protected]>
  • Loading branch information
gaius-qi authored Nov 6, 2023
1 parent f70a529 commit 132bdb0
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 13 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/check-size.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Check Size

on:
push:
branches: [ main, release-* ]
pull_request:
branches: [ main, release-* ]

env:
JAVA_VERSION: 8

jobs:
check_size:
name: Check Size
timeout-minutes: 10
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
with:
fetch-depth: 1

- name: Check large files
uses: actionsdesk/[email protected]
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
filesizelimit: "524288"
exclusionPatterns: |
deploy/helm-charts
manager/console
8 changes: 4 additions & 4 deletions .github/workflows/build.yml → .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Build
name: CI

on:
push:
Expand All @@ -8,10 +8,10 @@ on:

jobs:
build:
name: Build libtritonrepoagent_dragonfly.so
name: Build
runs-on: ubuntu-latest
steps:
- name: Check out code
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: recursive
Expand Down Expand Up @@ -45,7 +45,7 @@ jobs:
- name: Create build directory
run: mkdir -p $HOME/build

- name: Build the repository agent
- name: Build repository agent
run: |
mkdir -p $HOME/build && cd $HOME/build
cmake -DCMAKE_TOOLCHAIN_FILE=$HOME/vcpkg/scripts/buildsystems/vcpkg.cmake \
Expand Down
9 changes: 0 additions & 9 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
# Use a base image that includes development essentials and git
FROM ubuntu:latest AS builder

# Install build tools, git, and other dependencies
RUN apt-get update && apt-get install -y \
build-essential \
cmake \
Expand All @@ -13,11 +11,9 @@ RUN apt-get update && apt-get install -y \
pkg-config \
python3

# Install vcpkg
RUN git clone https://github.com/Microsoft/vcpkg.git /vcpkg \
&& /vcpkg/bootstrap-vcpkg.sh

# Install the required dependencies using vcpkg
RUN /vcpkg/vcpkg install re2 \
&& /vcpkg/vcpkg install aws-sdk-cpp \
&& /vcpkg/vcpkg install google-cloud-cpp[storage] \
Expand All @@ -26,19 +22,14 @@ RUN /vcpkg/vcpkg install re2 \

RUN mkdir -p /dragonfly-repository-agent/build

# Assuming the source code is located in a directory called 'source'
# You can COPY this in or clone from a repository as needed
COPY ./src /dragonfly-repository-agent/src
COPY ./cmake /dragonfly-repository-agent/cmake
COPY ./CMakeLists.txt /dragonfly-repository-agent/CMakeLists.txt

# Set the working directory
WORKDIR /dragonfly-repository-agent/build

# Set the environment variable for the vcpkg toolchain file
ENV VCPKG_TOOLCHAIN_FILE=/vcpkg/scripts/buildsystems/vcpkg.cmake

# Build the repository agent
RUN cmake -DCMAKE_TOOLCHAIN_FILE=${VCPKG_TOOLCHAIN_FILE} \
-DCMAKE_INSTALL_PREFIX:PATH=`pwd`/install \
-DTRITON_ENABLE_GCS=true \
Expand Down

0 comments on commit 132bdb0

Please sign in to comment.