Skip to content

GitHub actions #5433

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Jul 29, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 11 additions & 2 deletions .github/workflows/debian/64bit_regression_tests.patch
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
--- 64bit_regression_tests 2020-06-19 16:40:45.963502746 +0000
+++ 64bit_regression_tests_patch 2020-06-19 16:42:12.338994730 +0000
--- /tmp/64bit_regression_tests 2020-07-24 18:34:51.811830486 +0000
+++ 64bit_regression_tests 2020-07-24 18:36:44.827779374 +0000
@@ -87,7 +87,7 @@
<type>union myunion</type>
-<full_lhs>byte_extract_little_endian\(u, 0ll?, .*int.*\)</full_lhs>
+<full_lhs>byte_extract_little_endian\(u, 0l?l?, .*int.*\)</full_lhs>
- <full_lhs_value>\d+ll?</full_lhs_value>
+ <full_lhs_value binary="[01]+">\d+ll?</full_lhs_value>
<value>\{ \.i=\d+ll? \}</value>
<value_expression>
--- cbmc-5.12.orig/regression/cbmc/byte_update11/main.c
@@ -147,14 +147,14 @@
--harness-type call-function --function test --treat-pointer-as-array arr --associated-array-size arr:sz
^EXIT=0$
Expand Down
178 changes: 30 additions & 148 deletions .github/workflows/packages.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,19 +15,13 @@ jobs:
#
name: Generate package tag
runs-on: ubuntu-latest
env:
PACKAGE_NAME: cbmc-latest
VERSION_SCRIPT: .github/workflows/version.py
outputs:
time: ${{ steps.time.outputs.time }}
sha: ${{ steps.sha.outputs.sha }}
runid: ${{ steps.runid.outputs.runid }}
runnum: ${{ steps.runnum.outputs.runnum }}
name: ${{ env.PACKAGE_NAME }}
cbmc_version: ${{ steps.version.outputs.cbmc_version }}
pkg_version: ${{ steps.version.outputs.pkg_version }}
opentag: ${{ steps.opentag.outputs.opentag }}
closedtag: ${{ steps.closedtag.outputs.closedtag }}
steps:

- name: Checkout the repository
Expand Down Expand Up @@ -69,57 +63,17 @@ jobs:
echo CBMC_VERSION = ${{ steps.version.outputs.cbmc_version }}
echo PKG_VERSION = ${{ steps.version.outputs.pkg_version }}

Ubuntu16_Stable:
Ubuntu16:
name: Ubuntu 16 cbmc package
runs-on: ubuntu-16.04
needs: Tags
env:
OS: xenial
PKG_VERSION: ${{needs.Tags.outputs.pkg_version}}
CBMC_VERSION: ${{needs.Tags.outputs.cbmc_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_STABLE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~xenial_amd64.deb
ARTIFACT_STABLE_NAME: Ubuntu16 cbmc ${{needs.Tags.outputs.pkg_version}} xenial ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

PACKAGE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~xenial_amd64.deb
ARTIFACT_NAME: Ubuntu16 cbmc ${{needs.Tags.outputs.pkg_version}} xenial ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
SCRIPT_DIR: .github/workflows/debian
steps:

- name: Checkout the repository
uses: actions/checkout@v2

- name: Update the submodules
run: git submodule update --init

- name: Create the package
run: |
cp -r . /tmp/cbmc-${CBMC_VERSION}
cp ${SCRIPT_DIR}/Makefile ${SCRIPT_DIR}/changelog ${SCRIPT_DIR}/surefire ${SCRIPT_DIR}/64bit_regression_tests.patch /tmp
make -C /tmp GITHUB=1 STABLE=1 CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_STABLE_NAME}

- name: Upload the package
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_STABLE_NAME }}
path: ${{ env.PACKAGE_STABLE_NAME }}

Ubuntu16_Latest:
name: Ubuntu 16 cbmc-latest package
runs-on: ubuntu-16.04
needs: Tags
env:
OS: xenial
PKG_VERSION: ${{needs.Tags.outputs.pkg_version}}
CBMC_VERSION: ${{needs.Tags.outputs.cbmc_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_LATEST_NAME: cbmc-latest_${{needs.Tags.outputs.pkg_version}}~xenial_amd64.deb
ARTIFACT_LATEST_NAME: Ubuntu16 cbmc-latest ${{needs.Tags.outputs.pkg_version}} xenial ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

SCRIPT_DIR: .github/workflows/debian
steps:

- name: Checkout the repository
Expand All @@ -132,66 +86,26 @@ jobs:
run: |
cp -r . /tmp/cbmc-${CBMC_VERSION}
cp ${SCRIPT_DIR}/Makefile ${SCRIPT_DIR}/changelog ${SCRIPT_DIR}/surefire ${SCRIPT_DIR}/64bit_regression_tests.patch /tmp
make -C /tmp GITHUB=1 STABLE= CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_LATEST_NAME}
make -C /tmp GITHUB=1 STABLE=1 CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_NAME}

- name: Upload the package
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_LATEST_NAME }}
path: ${{ env.PACKAGE_LATEST_NAME }}
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.PACKAGE_NAME }}

Ubuntu18_Stable:
Ubuntu18:
name: Ubuntu 18 cbmc package
runs-on: ubuntu-18.04
needs: Tags
env:
OS: bionic
PKG_VERSION: ${{needs.Tags.outputs.pkg_version}}
CBMC_VERSION: ${{needs.Tags.outputs.cbmc_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_STABLE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~bionic_amd64.deb
ARTIFACT_STABLE_NAME: Ubuntu18 cbmc ${{needs.Tags.outputs.pkg_version}} bionic ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

PACKAGE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~bionic_amd64.deb
ARTIFACT_NAME: Ubuntu18 cbmc ${{needs.Tags.outputs.pkg_version}} bionic ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
SCRIPT_DIR: .github/workflows/debian
steps:

- name: Checkout the repository
uses: actions/checkout@v2

- name: Update the submodules
run: git submodule update --init

- name: Create the package
run: |
cp -r . /tmp/cbmc-${CBMC_VERSION}
cp ${SCRIPT_DIR}/Makefile ${SCRIPT_DIR}/changelog ${SCRIPT_DIR}/surefire ${SCRIPT_DIR}/64bit_regression_tests.patch /tmp
make -C /tmp GITHUB=1 STABLE=1 CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_STABLE_NAME}

- name: Upload the package
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_STABLE_NAME }}
path: ${{ env.PACKAGE_STABLE_NAME }}

Ubuntu18_Latest:
name: Ubuntu 18 cbmc-latest package
runs-on: ubuntu-18.04
needs: Tags
env:
OS: bionic
PKG_VERSION: ${{needs.Tags.outputs.pkg_version}}
CBMC_VERSION: ${{needs.Tags.outputs.cbmc_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_LATEST_NAME: cbmc-latest_${{needs.Tags.outputs.pkg_version}}~bionic_amd64.deb
ARTIFACT_LATEST_NAME: Ubuntu18 cbmc-latest ${{needs.Tags.outputs.pkg_version}} bionic ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

SCRIPT_DIR: .github/workflows/debian
steps:

- name: Checkout the repository
Expand All @@ -204,32 +118,25 @@ jobs:
run: |
cp -r . /tmp/cbmc-${CBMC_VERSION}
cp ${SCRIPT_DIR}/Makefile ${SCRIPT_DIR}/changelog ${SCRIPT_DIR}/surefire ${SCRIPT_DIR}/64bit_regression_tests.patch /tmp
make -C /tmp GITHUB=1 STABLE= CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_LATEST_NAME}
make -C /tmp GITHUB=1 STABLE=1 CBMC_VERSION=${CBMC_VERSION} PKG_VERSION=${PKG_VERSION}
mv /tmp/*.deb ${PACKAGE_NAME}

- name: Upload the package
uses: actions/upload-artifact@v1
with:
name: ${{ env.ARTIFACT_LATEST_NAME }}
path: ${{ env.PACKAGE_LATEST_NAME }}
name: ${{ env.ARTIFACT_NAME }}
path: ${{ env.PACKAGE_NAME }}

MacOS:
name: MacOS packages
name: MacOS tarball
runs-on: macos-10.15
needs: Tags
env:
OS: catalina
VERSION: ${{needs.Tags.outputs.pkg_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_STABLE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~catalina.tar.gz
PACKAGE_LATEST_NAME: cbmc-latest_${{needs.Tags.outputs.pkg_version}}~catalina.tar.gz

ARTIFACT_STABLE_NAME: MacOS cbmc ${{needs.Tags.outputs.pkg_version}} catalina ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
ARTIFACT_LATEST_NAME: MacOS cbmc-latest ${{needs.Tags.outputs.pkg_version}} catalina ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

PACKAGE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~catalina.tar.gz
ARTIFACT_NAME: MacOS cbmc ${{needs.Tags.outputs.pkg_version}} catalina ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
SCRIPT_DIR: .github/workflows/macos15

steps:

- name: Checkout the repository
Expand All @@ -241,37 +148,22 @@ jobs:
- name: Build the package
run: |
make -f ${SCRIPT_DIR}/Makefile
mv cbmc.tar.gz ${PACKAGE_STABLE_NAME}
mv cbmc-latest.tar.gz ${PACKAGE_LATEST_NAME}

- name: Upload the cbmc package
uses: actions/upload-artifact@v1
with:
name: ${{env.ARTIFACT_STABLE_NAME}}
path: ${{env.PACKAGE_STABLE_NAME}}
mv cbmc.tar.gz ${PACKAGE_NAME}

- name: Upload the cbmc-latest package
- name: Upload the package
uses: actions/upload-artifact@v1
with:
name: ${{env.ARTIFACT_LATEST_NAME}}
path: ${{env.PACKAGE_LATEST_NAME}}
name: ${{env.ARTIFACT_NAME}}
path: ${{env.PACKAGE_NAME}}

VS2019:
name: Windows VS2019 installers
name: Windows VS2019 installer
runs-on: windows-2019
needs: Tags
env:
OS: vs2019
VERSION: ${{needs.Tags.outputs.pkg_version}}
TIME: ${{needs.Tags.outputs.time}}
SHA: ${{needs.Tags.outputs.sha}}

PACKAGE_STABLE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~vs2019.msi
PACKAGE_LATEST_NAME: cbmc-latest_${{needs.Tags.outputs.pkg_version}}~vs2019.msi

ARTIFACT_STABLE_NAME: Windows cbmc ${{needs.Tags.outputs.pkg_version}} vs2019 ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
ARTIFACT_LATEST_NAME: Windows cbmc-latest ${{needs.Tags.outputs.pkg_version}} vs2019 ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}

PACKAGE_NAME: cbmc_${{needs.Tags.outputs.pkg_version}}~vs2019.msi
ARTIFACT_NAME: Windows cbmc ${{needs.Tags.outputs.pkg_version}} vs2019 ${{needs.Tags.outputs.time}} ${{needs.Tags.outputs.sha}} ${{needs.Tags.outputs.runid}}
SCRIPT_DIR: .github\workflows\vs2019

defaults:
Expand All @@ -294,22 +186,12 @@ jobs:
- name: Build cbmc
run: ${{env.SCRIPT_DIR}}\build-cbmc.bat

- name: Build the stable installer
- name: Build the installer
run: |
${{env.SCRIPT_DIR}}\build-installer.bat cbmc && move cbmc.msi ${{env.PACKAGE_STABLE_NAME}}

- name: Build the latest installer
run: |
${{env.SCRIPT_DIR}}\build-installer.bat cbmc-latest && move cbmc-latest.msi ${{env.PACKAGE_LATEST_NAME}}

- name: Upload the cbmc installer
uses: actions/upload-artifact@v1
with:
name: ${{env.ARTIFACT_STABLE_NAME}}
path: ${{env.PACKAGE_STABLE_NAME}}
${{env.SCRIPT_DIR}}\build-installer.bat cbmc && move cbmc.msi ${{env.PACKAGE_NAME}}

- name: Upload the cbmc-latest installer
- name: Upload the installer
uses: actions/upload-artifact@v1
with:
name: ${{env.ARTIFACT_LATEST_NAME}}
path: ${{env.PACKAGE_LATEST_NAME}}
name: ${{env.ARTIFACT_NAME}}
path: ${{env.PACKAGE_NAME}}