Skip to content

Commit

Permalink
Review fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
tstellar committed Jan 3, 2024
1 parent 878aa88 commit 2da2d30
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/build-ci-container.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,21 @@ jobs:
- name: Checkout LLVM
uses: actions/checkout@v4
with:
sparse-checkout: .github/workflows/containers/github-action-ci/

- name: Build Container
working-directory: ./.github/workflows/containers/github-action-ci/
run: |
podman build -t ${{ steps.vars.outputs.container-name-tag }} .
podman tag ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}:latest
- name: Test Container
run: |
for image in ${{ steps.vars.outputs.container-name-tag }} ${{ steps.vars.outputs.container-name }}; do
podman run --rm -it $image /usr/bin/bash -x -c 'printf '\''#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }'\'' | clang++ -x c++ - && ./a.out | grep Hello'
done
- name: Push Container
if: github.event_name == 'push'
env:
Expand Down
4 changes: 0 additions & 4 deletions .github/workflows/containers/github-action-ci/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@ RUN apt-get update && \
RUN mkdir -p $LLVM_SYSROOT/bin/ $LLVM_SYSROOT/lib/

RUN curl -O -L https://github.com/llvm/llvm-project/releases/download/llvmorg-$LLVM_VERSION/$LLVM_FILENAME
#COPY $LLVM_FILENAME .

RUN tar -C $LLVM_SYSROOT --strip-components=1 -xJf $LLVM_FILENAME \
$LLVM_DIRNAME/bin/clang \
Expand Down Expand Up @@ -47,6 +46,3 @@ RUN apt-get update && \

ENV LLVM_SYSROOT=$LLVM_SYSROOT
ENV PATH=${LLVM_SYSROOT}/bin:${PATH}

# Test clang
RUN printf '#include <iostream>\nint main(int argc, char **argv) { std::cout << "Hello\\n"; }' | clang++ -x c++ - && ./a.out | grep Hello

0 comments on commit 2da2d30

Please sign in to comment.