Skip to content

Commit

Permalink
ci: add binary archive on tsurugi-CI (follow up)
Browse files Browse the repository at this point in the history
  • Loading branch information
akirakw committed Jan 16, 2025
1 parent 37f2ab9 commit 59e4e15
Showing 1 changed file with 30 additions and 21 deletions.
51 changes: 30 additions & 21 deletions .github/workflows/ci-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,32 +28,25 @@ jobs:
with:
submodules: recursive

- name: Install
- name: Generate_Install_Archive
run: |
git config --global --add safe.directory "${GITHUB_WORKSPACE}"
mkdir build-install-test
./install.sh --prefix="$(pwd)/build-install-test" --symbolic --skip=harinoki
env:
TG_COMMON_CMAKE_BUILD_OPTIONS: '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache'
if [[ "${GITHUB_REF_TYPE}" == "tag" ]]; then
export TG_RELEASE_TSURUGI_VERSION=${GITHUB_REF_NAME}
fi
./dist/install/generate-install-archive.sh
- name: Generate_Binary_Archive
if: matrix.os == 'ubuntu-22.04' && (contains(github.ref, '/tags/') || contains(github.ref, '/heads/master'))
- name: Install
run: |
cd build-install-test
tar -czf ../tsurugidb-bin-${{ matrix.os }}-snapshot-${GITHUB_SHA::7}.tar.gz *
- name: Upload_Binary_Archive
if: matrix.os == 'ubuntu-22.04' && (contains(github.ref, '/tags/') || contains(github.ref, '/heads/master'))
uses: actions/upload-artifact@v4
with:
name: binary-archive-${{ matrix.os }}
path: tsurugidb-bin-*.tar.gz
mkdir work-install
mkdir build-install-test
- name: Generate_Install_Archive
if: matrix.os == 'ubuntu-22.04'
run: |
./dist/install/generate-install-archive.sh
cd work-install
tar xf ../tsurugidb-*.tar.gz --strip-components 1
./install.sh --prefix=${GITHUB_WORKSPACE}/build-install-test --symbolic --skip=harinoki
env:
TG_COMMON_CMAKE_BUILD_OPTIONS: '-DCMAKE_CXX_COMPILER_LAUNCHER=ccache'

- name: Upload_Install_Archive
if: matrix.os == 'ubuntu-22.04'
Expand All @@ -65,9 +58,25 @@ jobs:
- name: Show_Tsurugi_Version
if: matrix.os == 'ubuntu-22.04'
run: |
tar xf tsurugidb-*.tar.gz --strip-components 1 --wildcards */BUILDINFO.md
cd work-install
cat BUILDINFO.md >> ${GITHUB_STEP_SUMMARY}
- name: Generate_Binary_Archive
if: matrix.os == 'ubuntu-22.04' && (contains(github.ref, '/tags/') || contains(github.ref, '/heads/master'))
run: |
cd build-install-test
TSURUGI_VERSION=$(grep -oP '(?<=^TSURUGI_VERSION:).*' BUILDINFO.md)
tar -czf ../tsurugidb-bin-${{ matrix.os }}-${TSURUGI_VERSION}.tar.gz *
mv tsurugidb-bin-*.tar.gz
- name: Upload_Binary_Archive
if: matrix.os == 'ubuntu-22.04' && (contains(github.ref, '/tags/') || contains(github.ref, '/heads/master'))
uses: actions/upload-artifact@v4
with:
name: binary-archive-${{ matrix.os }}
path: tsurugidb-bin-*.tar.gz

Test:
uses: ./.github/workflows/ci-test-modules.yml
secrets: inherit
Expand Down

0 comments on commit 59e4e15

Please sign in to comment.