From f05de7aa704c037ddeaf32f10e80341f50ab0688 Mon Sep 17 00:00:00 2001 From: Seokhyun Lee <7948302+henrylee97@users.noreply.github.com> Date: Wed, 29 Nov 2023 13:20:51 +0900 Subject: [PATCH] chore(cicd): fix bug in specifying tag (#65) * chore(cicd): fix bug in specifying tag * chore(c): bootstrap benchmarks with base images * perf: debuging collected benchmarks * fix: typo * fix: typo * fix: use find to only find the directory name --- .github/workflows/build.yml | 2 +- .github/workflows/check.yml | 12 +++++++----- C-base/flex/Dockerfile | 1 + C-base/snort/Dockerfile | 1 + 4 files changed, 10 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 471e8eb11..bcb77ff97 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -50,7 +50,7 @@ jobs: id: make-build-info run: | echo "language=$(echo ${{ matrix.target }} | cut -d '/' -f 1 | tr '[:upper:]' '[:lower:]')" >> ${GITHUB_OUTPUT} - echo "project=$(echo ${{ matrix.target }} | cut -d '/' -f 2 )" + echo "project=$(echo ${{ matrix.target }} | cut -d '/' -f 2 )" >> ${GITHUB_OUTPUT} - uses: docker/setup-buildx-action@v3 - uses: docker/build-push-action@v5 diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml index f6f7e3202..777c40ca2 100644 --- a/.github/workflows/check.yml +++ b/.github/workflows/check.yml @@ -20,17 +20,19 @@ jobs: run: | bases=$(git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} origin/${{ github.head_ref }} | grep -e "^OCaml-base/" -e "^Java-base/" -e "^C-base/" -e "^Solidity-base/" | cut -d '/' -f 1-2 | sort | uniq) { - for base in $base; do + for base in $bases; do base=$(echo $base | sed 's/-base//') - ls $base-* + find $base-* -maxdepth 0 -type d done - } > updated.txt + } > /tmp/updated.txt + cat /tmp/updated.txt - id: find-benchmark-updates run: | - git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} origin/${{ github.head_ref }} | grep -e "^OCaml/" -e "^Java/" -e "^C/" -e "^Solidity/" | cut -d '/' -f 1-2 | sort | uniq >> updated.txt + git diff --name-only --diff-filter=ACMR origin/${{ github.base_ref }} origin/${{ github.head_ref }} | grep -e "^OCaml/" -e "^Java/" -e "^C/" -e "^Solidity/" | cut -d '/' -f 1-2 | sort | uniq >> /tmp/updated.txt + cat /tmp/updated.txt - id: find-targets run: | - targets=$(cat updated.txt | xargs -I{prj} echo \"{prj}\" | tr '\n' ',' | sed 's/,*$//') + targets=$(cat /tmp/updated.txt | xargs -I{prj} echo \"{prj}\" | tr '\n' ',' | sed 's/,*$//') echo $targets echo "targets=[$targets]" >> ${GITHUB_OUTPUT} diff --git a/C-base/flex/Dockerfile b/C-base/flex/Dockerfile index 399d35906..69625bf7d 100644 --- a/C-base/flex/Dockerfile +++ b/C-base/flex/Dockerfile @@ -23,3 +23,4 @@ RUN git clone https://github.com/westes/flex.git buggy \ && git checkout d3de49f84224b18c5287653f20525291b24cc26e \ && ./autogen.sh \ && ./configure + diff --git a/C-base/snort/Dockerfile b/C-base/snort/Dockerfile index 569967f75..db1d111be 100644 --- a/C-base/snort/Dockerfile +++ b/C-base/snort/Dockerfile @@ -33,3 +33,4 @@ RUN mkdir -p buggy \ && mv /tmp/src/util.h /workspace/buggy/src/util.h \ && cd buggy \ && ./configure +