diff --git a/.github/workflows/nightly-clam-docker.yaml b/.github/workflows/nightly-clam-docker.yaml new file mode 100644 index 00000000..77ef7c94 --- /dev/null +++ b/.github/workflows/nightly-clam-docker.yaml @@ -0,0 +1,45 @@ +# Workflow to push clam image in dockerhub + +name: Nightly + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the dev14 branch + schedule: + - cron: 0 0 * * * # run every day at UTC 00:00 + workflow_dispatch: + branches: dev14 + inputs: + Triggerer: + description: 'Triggered by:' + required: true + default: '' + + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "test" + test: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check out repo + uses: actions/checkout@v2 + with: + ref: dev14 + - name: Build clam and run tests + run: docker build -t seahorn/clam-llvm14:nightly -f docker/clam.Dockerfile . + # Logging in using this mechanism prints the following warning + # WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json. + # There does not seem to be an easy way around it though using docker actions may mitigate + # it. + - name: Login to DockerHub Registry + if: ${{ github.event_name == 'schedule' }} # only push if nightly run + run: echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin + - name: Tag and push clam (nightly) + if: ${{ github.event_name == 'schedule' }} # only push if nightly run + run: | + docker push seahorn/clam-llvm14:nightly diff --git a/.github/workflows/test-clam-dev14-docker.yaml b/.github/workflows/test-clam-dev14-docker.yaml new file mode 100644 index 00000000..2b0970fe --- /dev/null +++ b/.github/workflows/test-clam-dev14-docker.yaml @@ -0,0 +1,28 @@ +# Workflow to build and test clam after each push or pull request + +name: CI-dev14 + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events but only for the dev14 branch + push: + branches: dev14 + pull_request: + branches: dev14 + +# A workflow run is made up of one or more jobs that can run sequentially or in parallel +jobs: + # This workflow contains a single job called "test" + test: + # The type of runner that the job will run on + runs-on: ubuntu-latest + + # Steps represent a sequence of tasks that will be executed as part of the job + steps: + # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it + - name: Check out repo + uses: actions/checkout@v2 + with: + ref: dev14 + - name: Build clam and run tests + run: docker build -t seahorn/clam-llvm14:nightly -f docker/clam.Dockerfile . diff --git a/.github/workflows/test-clam-docker.yml b/.github/workflows/test-clam-docker.yml index 1a4fb588..f6e2f9e9 100644 --- a/.github/workflows/test-clam-docker.yml +++ b/.github/workflows/test-clam-docker.yml @@ -1,16 +1,14 @@ -# workflow to build and test clam +# Workflow to build and test clam after each push or pull request name: CI # Controls when the action will run. on: - # Triggers the workflow on push or pull request events but only for the master and dev14 branches + # Triggers the workflow on push or pull request events but only for the master branch push: - branches: [master, dev14] + branches: master pull_request: - branches: [master, dev14] - schedule: - - cron: 0 0 * * * # run every day at UTC 00:00 + branches: master # A workflow run is made up of one or more jobs that can run sequentially or in parallel jobs: @@ -25,17 +23,6 @@ jobs: - name: Check out repo uses: actions/checkout@v2 with: - ref: master + ref: master - name: Build clam and run tests - run: docker build --build-arg BRANCH=master -t seahorn/clam-llvm14:nightly -f docker/clam.Dockerfile . - # Logging in using this mechanism prints the following warning - # WARNING! Your password will be stored unencrypted in /home/runner/.docker/config.json. - # There does not seem to be an easy way around it though using docker actions may mitigate - # it. - - name: Login to DockerHub Registry - if: ${{ github.event_name == 'schedule' }} # only push if nightly run - run: echo ${{ secrets.DOCKER_HUB_ACCESS_TOKEN }} | docker login -u ${{ secrets.DOCKER_HUB_USERNAME }} --password-stdin - - name: Tag and push clam (nightly) - if: ${{ github.event_name == 'schedule' }} # only push if nightly run - run: | - docker push seahorn/clam-llvm14:nightly + run: docker build -t seahorn/clam-llvm14:nightly -f docker/clam.Dockerfile . diff --git a/docker/clam.Dockerfile b/docker/clam.Dockerfile index e8f5f804..d358b134 100644 --- a/docker/clam.Dockerfile +++ b/docker/clam.Dockerfile @@ -10,11 +10,6 @@ FROM seahorn/buildpack-deps-seahorn:$BASE_IMAGE # Needed to run clang with -m32 RUN apt-get install -yqq libc6-dev-i386 -#ARG BRANCH=dev14 -#RUN cd / && rm -rf /clam && \ -# git clone -b $BRANCH https://github.com/seahorn/clam.git clam --depth=10 ; \ -# mkdir -p /clam/build - # Assume that docker-build is ran in the top-level Clam directory COPY . /clam # Re-create the build directory that might have been present in the source tree