Skip to content

Commit

Permalink
Create release.yml
Browse files Browse the repository at this point in the history
Fix build

Fix release actin

Fix build

Fix build

Fix build

Fix build

fix build

fix build

fix-build
  • Loading branch information
dutor committed Mar 16, 2020
1 parent f1befbe commit 06cd081
Show file tree
Hide file tree
Showing 5 changed files with 53 additions and 5 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
on:
push:
tags:
- 'v*'

name:

jobs:
build:
name: Release
runs-on: ubuntu-latest
steps:
- name: Prepare Environment
run: |
sudo apt-get update
sudo apt-get install -y lsb-core cmake curl wget libelf-dev
sudo bash -s < <(curl -s https://raw.githubusercontent.com/dutor/nebula-gears/master/install)
sudo install-gcc --version=9.2.0
- name: Checkout Code
uses: actions/checkout@v2
- name: Build project
run: |
source /opt/vesoft/toolset/gcc/9.2.0/enable
mkdir build && cd build
cmake ..
make package
- name: Create Release
id: create_release
uses: actions/create-release@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
tag_name: ${{ github.ref }}
release_name: Nebula Gears ${{ github.ref }}
draft: false
prerelease: false
- name: Upload Release Asset
id: upload-release-asset
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ steps.create_release.outputs.upload_url }}
asset_path: ./nebula-gears-installer.sh
asset_name: nebula-gears-installer.sh
asset_content_type: application/x-sh
2 changes: 2 additions & 0 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ set(installed_files_file "installed_files")

add_custom_target(
package
COMMAND
make -s
COMMAND
make -s install/strip DESTDIR=${stage_dir}
COMMAND
Expand Down
2 changes: 1 addition & 1 deletion docker/third-party/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ oss_secret := $(shell [[ -f $$HOME/.ossutilconfig ]] && sed 's;^accessKeySecret=

docker_cmd := docker run -v $$PWD/third-party-packages:/data
ifneq ($(oss_endpoint),)
docker_cmd = docker run -e OSS_ENDPOINT=$(oss_endpoint) -e OSS_ID=$(oss_id) -e OSS_SECRET=$(oss_secret)
docker_cmd += -e OSS_ENDPOINT=$(oss_endpoint) -e OSS_ID=$(oss_id) -e OSS_SECRET=$(oss_secret)
endif
ifneq ($(USE_GCC_VERSIONS),)
docker_cmd += -e USE_GCC_VERSIONS=$(USE_GCC_VERSIONS)
Expand Down
4 changes: 2 additions & 2 deletions docker/third-party/images/build-third-party.sh
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ export PATH=$PWD/cmake-3.15.5/bin:$PATH

for v in $(echo $versions | tr ',' ' ')
do
source /opt/vesoft/toolset/gcc/$v/enable;
source /opt/vesoft/toolset/gcc/$v/enable
rm -rf /opt/vesoft/third-party
build_package=1 disable_cxx11_abi=0 nebula/third-party/build-third-party.sh /opt/vesoft/third-party
rm -rf /opt/vesoft/third-party
build_package=1 disable_cxx11_abi=1 nebula/third-party/build-third-party.sh /opt/vesoft/third-party
source /opt/vesoft/toolset/gcc/$v/disable;
source /opt/vesoft/toolset/gcc/$v/disable
done

cp -v third-party/vesoft-third-party-*.sh /data
Expand Down
4 changes: 2 additions & 2 deletions docker/toolset/build/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ oss_endpoint := $(shell [[ -f $$HOME/.ossutilconfig ]] && sed 's;^endpoint=(.*);
oss_id := $(shell [[ -f $$HOME/.ossutilconfig ]] && sed 's;^accessKeyID=(.*);\1;p' -rn $$HOME/.ossutilconfig)
oss_secret := $(shell [[ -f $$HOME/.ossutilconfig ]] && sed 's;^accessKeySecret=(.*);\1;p' -rn $$HOME/.ossutilconfig)

docker_cmd := docker run -v $$PWD/toolset-packages:/data -e LOCATION=/data
docker_cmd := docker run -v $$PWD/toolset-packages:/data
ifneq ($(oss_endpoint),)
docker_cmd += docker run -e OSS_ENDPOINT=$(oss_endpoint) -e OSS_ID=$(oss_id) -e OSS_SECRET=$(oss_secret)
docker_cmd += -e OSS_ENDPOINT=$(oss_endpoint) -e OSS_ID=$(oss_id) -e OSS_SECRET=$(oss_secret)
endif
ifneq ($(BUILD_GCC_VERSIONS),)
docker_cmd += -e BUILD_GCC_VERSIONS=$(BUILD_GCC_VERSIONS)
Expand Down

0 comments on commit 06cd081

Please sign in to comment.