Skip to content

Commit

Permalink
add build release workflow
Browse files Browse the repository at this point in the history
Signed-off-by: yuchen.cc <[email protected]>
  • Loading branch information
yuchen0cc authored and liulanzheng committed Apr 4, 2023
1 parent 5ff40df commit b9ea780
Show file tree
Hide file tree
Showing 2 changed files with 71 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/latest-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
name: latest-release

on:
push:
branches:
- master

env:
BUILD_TYPE: Release

jobs:
build:
runs-on: ubuntu-18.04

steps:
- uses: actions/checkout@v2

- name: Install Dependencies
shell: bash
run: |
sudo apt update -y
- name: Build
working-directory: ${{github.workspace}}
shell: bash
run: |
${{github.workspace}}/build.sh
- uses: "marvinpinto/action-automatic-releases@latest"
with:
repo_token: "${{ secrets.GITHUB_TOKEN }}"
automatic_release_tag: "latest"
prerelease: false
title: "Development Build"
files: |
build/libext2fs.tar.gz
26 changes: 26 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#!/bin/bash

VERSION=v1.46.6-opt
ARCH=`uname -m`
RELEASE=`date "+%Y%m%d%H%M%S"`

if [[ ! -d build ]];then
echo "create build directory ..."
mkdir build
else
echo "clean bulid directory ..."
rm -rf build/*
fi

echo "build ..."
cd build
../configure --enable-elf-shlibs CFLAGS="-fPIC -O3" CXXFLAGS="-fPIC -O3" --prefix=`pwd`/${VERSION}
make -j
sudo make install

mkdir libext2fs libext2fs/include libext2fs/lib
cp -r ${VERSION}/include/ext2fs libext2fs/include
cp -P ${VERSION}/lib/libext2fs.so* libext2fs/lib
tar -zcf libext2fs.tar.gz libext2fs

echo "done"

0 comments on commit b9ea780

Please sign in to comment.