Skip to content

Commit

Permalink
Use hugepages in GH workflows
Browse files Browse the repository at this point in the history
  • Loading branch information
afritzler committed Dec 1, 2023
1 parent a064105 commit 019781b
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 8 deletions.
19 changes: 14 additions & 5 deletions .github/workflows/publish-docker-tester.yml
Original file line number Diff line number Diff line change
Expand Up @@ -68,7 +68,6 @@ jobs:
version: latest
endpoint: ${{ env.CONTEXT_NAME }} # self-hosted
- name: Login to GHCR
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ghcr.io
Expand All @@ -80,16 +79,26 @@ jobs:
with:
context: .
platforms: ${{env.platforms}}
push: ${{ github.event_name != 'pull_request' }}
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: tester
secrets: |
"github_token=${{ secrets.BOT_PAT }}"
"github_token=${{ secrets.GITHUB_TOKEN }}"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
test:
runs-on: [ self-hosted, dpdk ]
runs-on: ubuntu-latest
needs: buildAndPushTester
steps:
- name: Configure Hugepages
run: |
ls -l /sys/kernel/mm/hugepages/
cat /proc/meminfo
cat /proc/mounts | grep hugetlbfs
sudo sysctl -w vm.nr_hugepages=1024
sudo mkdir -p /mnt/huge
sudo mount -t hugetlbfs nodev /mnt/huge
- name: Determine SHA for Docker Image
id: get_sha
run: |
Expand All @@ -101,4 +110,4 @@ jobs:
- name: Run tests
id: run_tests
run: |
docker run --privileged --mount type=bind,source=/dev/hugepages,target=/dev/hugepages ghcr.io/ironcore-dev/dpservice-tester:${{ env.DOCKER_IMAGE_SHA }}
docker run -v /mnt/huge:/dev/hugepages ghcr.io/ironcore-dev/dpservice-tester:${{ env.DOCKER_IMAGE_SHA }}
2 changes: 0 additions & 2 deletions .github/workflows/publish-docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,3 @@ jobs:
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
target: production
secrets: |
"github_token=${{ secrets.BOT_PAT }}"
1 change: 0 additions & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,6 @@ COPY .git/ .git/
# therefore downloading using 'ADD' is not possible
RUN --mount=type=secret,id=github_token,dst=/run/secrets/github_token \
sh -c 'GITHUB_TOKEN=$(if [ -f /run/secrets/github_token ]; then cat /run/secrets/github_token; else echo ""; fi) \
&& ./hack/rel_download.sh -dir=exporter -owner=ironcore-dev -repo=prometheus-dpdk-exporter -pat=$GITHUB_TOKEN \
&& ./hack/rel_download.sh -dir=client -owner=ironcore-dev -repo=dpservice-cli -strip=2 -pat=$GITHUB_TOKEN'

# Compile dpservice-bin itself
Expand Down

0 comments on commit 019781b

Please sign in to comment.