diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml new file mode 100644 index 0000000..c14cb7f --- /dev/null +++ b/.github/workflows/release.yml @@ -0,0 +1,87 @@ +name: Version Release + +on: + push: + tags: + - 'v*' + +jobs: + create-release: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Create Release + uses: ncipollo/release-action@v1 + with: + allowUpdates: true + omitBody: true + prerelease: true + draft: true + token: ${{ secrets.GITHUB_TOKEN }} + + qemu_job: + runs-on: ubuntu-latest + permissions: + contents: write + name: Build aarch64 on ubuntu20.04 + needs: create-release + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - uses: uraimo/run-on-arch-action@v2 + name: Run commands + id: runcmd + with: + arch: aarch64 + distro: ubuntu20.04 + githubToken: ${{ github.token }} + # Create an artifacts directory + setup: | + mkdir -p "${PWD}/artifacts" + + # Mount the artifacts directory as /artifacts in the container + dockerRunArgs: | + --volume "${{ github.workspace }}:/src" + # The shell to run commands with in the container + shell: /bin/bash + install: | + export DEBIAN_FRONTEND=noninteractive + apt update && apt install -q -y autoconf-archive cmake curl git libssl-dev \ + libunwind-dev ninja-build libtool gcc-9 g++-9 libboost-fiber-dev \ + libxml2-dev zip + update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-9 40 \ + --slave /usr/bin/g++ g++ /usr/bin/g++-9 + run: | + cd /src + ./tools/release.sh + - name: Show the artifact + # Items placed in /src/build-opt in the container will be in + # ${PWD}/build-opt on the host. + run: | + echo finished + ls -al + + build_native: + runs-on: ubuntu-latest + needs: create-release + container: + image: ghcr.io/romange/ubuntu-dev:20 + permissions: + contents: write + steps: + - uses: actions/checkout@v2 + with: + submodules: true + - name: Build artifacts + run: | + ./tools/release.sh + - uses: ncipollo/release-action@v1 + with: + artifacts: "build-opt/dragonfly-*" + allowUpdates: true + body: "example" + draft: true + prerelease: true + token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/tools/docker/Dockerfile.ubuntu-prod b/tools/docker/Dockerfile.ubuntu-prod index ec7c85b..c7bf227 100644 --- a/tools/docker/Dockerfile.ubuntu-prod +++ b/tools/docker/Dockerfile.ubuntu-prod @@ -10,7 +10,7 @@ COPY src/ ./src/ COPY helio/ ./helio/ COPY patches/ ./patches/ COPY CMakeLists.txt ./ -RUN ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON +RUN ./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON WORKDIR build-opt RUN ninja dragonfly diff --git a/tools/release.sh b/tools/release.sh new file mode 100755 index 0000000..7c55b71 --- /dev/null +++ b/tools/release.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +set -e + +if ! [ -d helio ]; then + echo "could not find helio" + exit 1 +fi + +ARCH=`uname -m` +pwd +./helio/blaze.sh -release -DBoost_USE_STATIC_LIBS=ON -DOPENSSL_USE_STATIC_LIBS=ON +cd build-opt +ninja dragonfly && ldd dragonfly +mv dragonfly dragonfly-${ARCH} \ No newline at end of file