Skip to content

Add support to build remill on windows with static CRT. #20

Add support to build remill on windows with static CRT.

Add support to build remill on windows with static CRT. #20

name: Build and Publish Docker Images
on:
push:
tags:
- 'v*'
pull_request:
branches:
- master
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
REGISTRY: ghcr.io
jobs:
build-and-push:
runs-on: ubuntu-22.04
permissions:
contents: read
packages: write
strategy:
fail-fast: false
matrix:
llvm: ["19", "21"]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Log in to GitHub Container Registry
if: github.event_name != 'pull_request'
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v5
with:
# Package name: remill/llvm19-ubuntu22.04
images: ${{ env.REGISTRY }}/lifting-bits/remill/llvm${{ matrix.llvm }}-ubuntu22.04
tags: |
type=raw,value=latest,enable={{is_default_branch}}
type=sha
type=ref,event=tag
type=ref,event=pr
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: .
file: ./Dockerfile.llvm
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
build-args: |
LLVM_VERSION=${{ matrix.llvm }}
UBUNTU_VERSION=22.04
cache-from: type=gha
cache-to: type=gha,mode=max
- name: Test Docker image (PR only)
if: github.event_name == 'pull_request'
run: |
docker build \
--build-arg LLVM_VERSION=${{ matrix.llvm }} \
--build-arg UBUNTU_VERSION=22.04 \
-f Dockerfile.llvm \
-t test-image .
docker run --rm test-image --version
docker run --rm test-image --arch amd64 --ir_out /dev/stdout --bytes c704ba01000000