Skip to content
30 changes: 30 additions & 0 deletions .github/workflows/metis-glibc-floor-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Metis GLIBC Floor Test

on:
pull_request:
paths:
- 'metis/**/*.go'
- 'metis/Dockerfile'

jobs:
native-execution-test:
runs-on: ubuntu-22.04
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Build Docker image
run: |
cd metis
docker build -t metis-candidate .

- name: Extract binary
run: |
docker create --name temp-metis metis-candidate
docker cp temp-metis:/metis ./metis-candidate
docker rm temp-metis
chmod +x ./metis-candidate

- name: Execute binary natively
run: |
./metis-candidate --help
16 changes: 16 additions & 0 deletions metis/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,22 @@ push-image: ## Build and push the multi-arch image independently.
--build-arg BUILD_DATE=$(BUILD_DATE) \
-t $(IMAGE_REGISTRY)/$(IMAGE_NAME):$(TAG) --push .

.PHONY: test-glibc-floor
test-glibc-floor: ## Build image and test glibc floor locally in container
docker build \
--build-arg GIT_VERSION=$(GIT_VERSION) \
--build-arg GIT_COMMIT=$(GIT_COMMIT) \
--build-arg BUILD_DATE=$(BUILD_DATE) \
-t metis-candidate .
@mkdir -p bin
-docker rm -f temp-metis 2>/dev/null
docker create --name temp-metis metis-candidate
docker cp temp-metis:/metis bin/metis-candidate
docker rm temp-metis
chmod +x bin/metis-candidate
docker run --rm -v $(CURDIR)/bin/metis-candidate:/metis ubuntu:22.04 /metis --help
rm bin/metis-candidate

##@ Help

.PHONY: help
Expand Down