From 3416322e50877b1e86da2f177f0118af2217c6f4 Mon Sep 17 00:00:00 2001 From: Govind Kamat Date: Sun, 8 Sep 2024 15:42:10 -0700 Subject: [PATCH] Build changes docker update. Signed-off-by: Govind Kamat --- ...elease-drafter.yml => publish-release.yml} | 19 +++++++++---------- docker/Dockerfile | 9 ++++++--- 2 files changed, 15 insertions(+), 13 deletions(-) rename .github/workflows/{release-drafter.yml => publish-release.yml} (79%) diff --git a/.github/workflows/release-drafter.yml b/.github/workflows/publish-release.yml similarity index 79% rename from .github/workflows/release-drafter.yml rename to .github/workflows/publish-release.yml index 54e12cf82..ab07aadd5 100644 --- a/.github/workflows/release-drafter.yml +++ b/.github/workflows/publish-release.yml @@ -1,4 +1,4 @@ -name: Release drafter +name: Publish Release to GitHub on: push: @@ -6,7 +6,7 @@ on: - "*" jobs: - draft-a-release: + publish-release: runs-on: ubuntu-latest steps: - name: Checkout Repository @@ -22,21 +22,20 @@ jobs: issue-title: 'Release opensearch-benchmark' issue-body: "Please approve or deny the release of opensearch-benchmark. **Tag**: ${{ github.ref_name }} **Commit**: ${{ github.sha }}" exclude-workflow-initiator-as-approver: true + - name: Set up Python 3 uses: actions/setup-python@v3 with: python-version: '3.x' - - name: Install build tools - run: | - python -m pip install --upgrade build + - name: Build project for distribution run: | - python -m build - tar -zvcf artifacts.tar.gz dist - - name: Release + make build + tar zcvf artifacts.tar.gz dist + + - name: Publish release uses: softprops/action-gh-release@v1 with: draft: true generate_release_notes: true - files: | - artifacts.tar.gz \ No newline at end of file + files: artifacts.tar.gz diff --git a/docker/Dockerfile b/docker/Dockerfile index 104a10972..468a60317 100644 --- a/docker/Dockerfile +++ b/docker/Dockerfile @@ -14,7 +14,10 @@ RUN apt-get -y update && \ COPY . opensearch-benchmark -RUN cd opensearch-benchmark; make wheel +RUN set -ex; \ + cd opensearch-benchmark; \ + make build; \ + test "`uname -m`" = aarch64 && pip install yappi && cp "`pip cache list --format abspath | grep yappi`" dist # @@ -30,7 +33,7 @@ RUN groupadd --gid 1000 opensearch-benchmark && \ RUN mkdir -p /opensearch-benchmark/.benchmark && \ chown -R 1000:0 /opensearch-benchmark/.benchmark -COPY --from=build-stage /opensearch-benchmark/opensearch-benchmark/yappi-*.whl /opensearch-benchmark/opensearch-benchmark/opensearch_benchmark-*.whl ./ +COPY --from=build-stage /opensearch-benchmark/opensearch-benchmark/dist/yappi-*.whl /opensearch-benchmark/opensearch-benchmark/dist/opensearch_benchmark-*.whl ./ # There is no binary package currently available for yappi on ARM. RUN set -ex; \ @@ -38,7 +41,7 @@ RUN set -ex; \ apt-get install -y git pbzip2; \ apt-get -y upgrade; \ rm -rf /var/lib/apt/lists/*; \ - PIP_ONLY_BINARY=h5py pip install yappi-*.whl opensearch_benchmark-*.whl; \ + PIP_ONLY_BINARY=h5py pip install *.whl; \ rm *.whl USER 1000