ci: fix release tarball process

add install target in Makefile to copy necessary libs, bins, and
includes to an installation directory. Use this install target to
package deps into a tarball with new installation instructions.
This commit is contained in:
youben11
2022-12-06 08:07:07 +01:00
committed by Ayoub Benaissa
parent 37ba62d713
commit ff4a0076a1
4 changed files with 50 additions and 39 deletions

View File

@@ -2,9 +2,10 @@
You can either install the compiler in user space or globally (you need root/sudo access):
1. User space install: extract the tarball to a chosen path and add chosen/path/concretecompiler/bin to your $PATH.
1. User space install: extract the tarball to a chosen path and make the lib, bin, and include directories accessible depending on your needs.
2. Global install: extract the tarball to a temporary path , and copy
- temporary/path/concretecompiler/bin/concretecompiler to /usr/bin (or a directory in $PATH)
- temporary/path/concretecompiler/lib/libConcretelangRuntime.so to /usr/lib (or another lib folder)
- temporary/path/concretecompiler/bin/* inside /usr/local/bin/ (or a directory in $PATH)
- temporary/path/concretecompiler/lib/* inside /usr/local/lib/ (or another lib folder)
- temporary/path/concretecompiler/include/* inside /usr/local/include/ (or another include folder)

View File

@@ -481,12 +481,33 @@ jobs:
- name: Login to Github Container Registry
run: echo "${{ secrets.GHCR_PASSWORD }}" | docker login -u ${{ secrets.GHCR_LOGIN }} --password-stdin ghcr.io
- name: Build
id: build-tarball
run: |
cd compiler
make release-tarballs
- name: Build Tarball
uses: addnab/docker-run-action@v3
with:
registry: ghcr.io
image: ${{ env.DOCKER_IMAGE_TEST }}
username: ${{ secrets.GHCR_LOGIN }}
password: ${{ secrets.GHCR_PASSWORD }}
options: >-
-v ${{ github.workspace }}/llvm-project:/llvm-project
-v ${{ github.workspace }}/compiler:/compiler
-v ${{ github.workspace }}/tarballs:/tarballs
-v ${{ github.workspace }}/.github/workflows/assets/Installation.md:/Installation.md
shell: bash
run: |
set -e
cd /compiler
rm -rf /build
make BINDINGS_PYTHON_ENABLED=OFF BUILD_DIR=/build INSTALL_PREFIX=/tarballs/ install
echo "Debug: ccache statistics (after the build):"
ccache -s
# package installation file and make tarball
cp /Installation.md /tarballs/concretecompiler/
cd /tarballs && tar -czvf concretecompiler.tar.gz concretecompiler
- name: Tag Tarball
id: tag-tarball
run: |
TAG="$(git describe --tags --abbrev=0)"
sudo cp "${{ github.workspace }}/tarballs/concretecompiler.tar.gz" "${{ github.workspace }}/tarballs/concretecompiler-${TAG}-x86_64-linux-gnu.tar.gz"
@@ -498,8 +519,8 @@ jobs:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_RELEASE }}
with:
upload_url: ${{ needs.CreateRelease.outputs.upload_url }}
asset_path: ${{ github.workspace }}/tarballs/${{ steps.build-tarball.outputs.ASSET_NAME }}
asset_name: ${{ steps.build-tarball.outputs.ASSET_NAME }}
asset_path: ${{ github.workspace }}/tarballs/${{ steps.tag-tarball.outputs.ASSET_NAME }}
asset_name: ${{ steps.tag-tarball.outputs.ASSET_NAME }}
asset_content_type: application/tar+gzip
BuildAndPushPackagesMacOS: