Skip to content

Commit

Permalink
use ubuntu 22.04
Browse files Browse the repository at this point in the history
  • Loading branch information
Ninja3047 committed Jul 27, 2023
1 parent 34be68d commit 037dd30
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 16 deletions.
16 changes: 8 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ jobs:
fail-fast: false
matrix:
image:
- { name: 'ubuntu', tag: '20.04' }
- { name: 'ubuntu', tag: '22.04' }
llvm: [
'16'
]
Expand Down Expand Up @@ -177,7 +177,7 @@ jobs:
release_packages:
# Do not run the release procedure if any of the builds has failed
needs: [ build_linux, build_mac ]
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
if: github.event_name == 'push' && startsWith(github.event.ref, 'refs/tags')

steps:
Expand Down Expand Up @@ -216,22 +216,22 @@ jobs:

- name: Group the packages by platform
run: |
zip -r9 rellic_ubuntu-20.04_packages.zip \
ubuntu-20.04*
zip -r9 rellic_ubuntu-22.04_packages.zip \
ubuntu-22.04*
zip -r9 rellic_macos-12_packages.zip \
macos-12*
- name: Upload the Ubuntu 20.04 packages
- name: Upload the Ubuntu 22.04 packages
uses: actions/upload-release-asset@v1

env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: rellic_ubuntu-20.04_packages.zip
asset_name: rellic_ubuntu-20.04_packages.zip
asset_path: rellic_ubuntu-22.04_packages.zip
asset_name: rellic_ubuntu-22.04_packages.zip
asset_content_type: application/gzip

- name: Upload the macOS 12 packages
Expand All @@ -251,7 +251,7 @@ jobs:
strategy:
matrix:
llvm: ["16"]
ubuntu: ["20.04"]
ubuntu: ["22.04"]
steps:
- uses: actions/checkout@v2
with:
Expand Down
12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ If you are experiencing undocumented problems with Rellic then ask for help in t

## Supported Platforms

Rellic is supported on Linux platforms and has been tested on Ubuntu 20.04.
Rellic is supported on Linux platforms and has been tested on Ubuntu 22.04.

## Dependencies

Expand Down Expand Up @@ -236,7 +236,7 @@ Finally, we build and package Rellic. This script will create another directory,

```shell
cd rellic
./scripts/build.sh --llvm-version 14
./scripts/build.sh --llvm-version 16
# to install the deb package, then do:
sudo dpkg -i rellic-build/*.deb
```
Expand Down Expand Up @@ -271,10 +271,10 @@ make -j8

The Docker image should provide an environment which can set-up, build, and run rellic. The Docker images are parameterized by Ubuntu verison, LLVM version, and architecture.

To build the docker image using LLVM 16 for Ubuntu 20.04 on amd64 you can run the following command:
To build the docker image using LLVM 16 for Ubuntu 22.04 on amd64 you can run the following command:

```sh
ARCH=amd64; UBUNTU=20.04; LLVM=16; docker build . \
ARCH=amd64; UBUNTU=22.04; LLVM=16; docker build . \
-t rellic:llvm${LLVM}-ubuntu${UBUNTU}-${ARCH} \
-f Dockerfile \
--build-arg UBUNTU_VERSION=${UBUNTU} \
Expand All @@ -286,13 +286,13 @@ To run the decompiler, the entrypoint has already been set, but make sure the bi

```sh
# Get the bc file
clang-14 -emit-llvm -c ./tests/tools/decomp/issue_4.c -o ./tests/tools/decomp/issue_4.bc
clang-16 -emit-llvm -c ./tests/tools/decomp/issue_4.c -o ./tests/tools/decomp/issue_4.bc

# Decompile
docker run --rm -t -i \
-v $(pwd):/test -w /test \
-u $(id -u):$(id -g) \
rellic:llvm14-ubuntu20.04-amd64 --input ./tests/tools/decomp/issue_4.bc --output /dev/stdout
rellic:llvm16-ubuntu22.04-amd64 --input ./tests/tools/decomp/issue_4.bc --output /dev/stdout
```

To explain the above command more:
Expand Down
8 changes: 6 additions & 2 deletions scripts/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,10 @@ function GetUbuntuOSVersion
OS_VERSION=ubuntu-20.04
return 0
;;
jammy)
OS_VERSION=ubuntu-22.04
return 0
;;
focal)
OS_VERSION=ubuntu-20.04
return 0
Expand All @@ -62,7 +66,7 @@ function GetUbuntuOSVersion
return 0
;;
*)
echo "[x] Ubuntu ${DISTRIB_CODENAME} is not supported. Only focal (20.04) and bionic (18.04) are pre-compiled."
echo "[x] Ubuntu ${DISTRIB_CODENAME} is not supported. Only jammy (22.04) are pre-compiled."
echo "[x] Please see https://github.com/lifting-bits/cxx-common to build dependencies from source."
return 1
;;
Expand Down Expand Up @@ -153,7 +157,7 @@ function GetOSVersion
;;

*debian*)
OS_VERSION=ubuntu-20.04
OS_VERSION=ubuntu-22.04
return 0;
;;

Expand Down

0 comments on commit 037dd30

Please sign in to comment.