refactor side branch #322
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Docker Image CI | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
branches: ["main"] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
variant: [iced, zydis] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build the Docker image | |
run: | | |
TAG=my-image-name:${{ matrix.variant }} | |
# decide whether to install Rust: only for "iced" | |
if [ "${{ matrix.variant }}" = "iced" ]; then | |
RUST_ARG=true | |
else | |
RUST_ARG=false | |
fi | |
docker build \ | |
--build-arg INSTALL_RUST=$RUST_ARG \ | |
--file Dockerfile \ | |
--tag $TAG \ | |
. | |
- name: Extract the lifter binary | |
run: | | |
TAG=my-image-name:${{ matrix.variant }} | |
docker create --name extract-container "$TAG" | |
mkdir -p ./output | |
docker cp extract-container:/root/Mergen/build/lifter \ | |
./output/lifter-${{ matrix.variant }} | |
docker rm extract-container | |
- name: Upload the extracted binary as an artifact | |
uses: actions/upload-artifact@v4 | |
with: | |
name: lifter-${{ matrix.variant }} | |
path: ./output/lifter-${{ matrix.variant }} |