Skip to content

Commit

Permalink
Testing release
Browse files Browse the repository at this point in the history
  • Loading branch information
kuznetsss committed Dec 7, 2023
1 parent 11dd4e9 commit a41c1f6
Show file tree
Hide file tree
Showing 3 changed files with 106 additions and 69 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
lint:
name: Lint
name: Check format
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v4
Expand Down
161 changes: 93 additions & 68 deletions .github/workflows/nightly.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,75 @@ on:
branches: [develop]

jobs:
build:
name: Build clio
# build:
# name: Build clio
# strategy:
# fail-fast: false
# matrix:
# include:
# - os: macOS
# build_type: Release
# - os: Linux
# build_type: Release
# container:
# image: conanio/gcc11:1.61.0
# options: --user root
# - os: Linux
# build_type: Debug
# container:
# image: conanio/gcc11:1.61.0
# options: --user root
# runs-on: [self-hosted, "${{ matrix.os }}"]
# container: ${{ matrix.container }}
#
# steps:
# - uses: actions/checkout@v4
# with:
# fetch-depth: 0
#
# - name: Prepare runner
# uses: ./.github/actions/prepare_runner
# with:
# disable_ccache: true
#
# - name: Setup conan
# uses: ./.github/actions/setup_conan
# id: conan
#
# - name: Run conan and cmake
# uses: ./.github/actions/generate
# with:
# conan_profile: ${{ steps.conan.outputs.conan_profile }}
# conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
# build_type: ${{ matrix.build_type }}
#
# - name: Build Clio
# uses: ./.github/actions/build_clio
#
# - name: Strip tests
# run: strip build/clio_tests
#
# - name: Upload clio_tests
# uses: actions/upload-artifact@v3
# with:
# name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
# path: build/clio_tests
#
# - name: Compress clio_server
# shell: bash
# run: |
# cd build
# tar czf ./clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz ./clio_server
#
# - name: Upload clio_server
# uses: actions/upload-artifact@v3
# with:
# name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
# path: build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
#

run_tests:
# needs: build
strategy:
fail-fast: false
matrix:
Expand All @@ -17,88 +84,38 @@ jobs:
build_type: Release
- os: Linux
build_type: Release
container:
image: conanio/gcc11:1.61.0
options: --user root
- os: Linux
build_type: Debug
container:
image: conanio/gcc11:1.61.0
options: --user root
runs-on: [self-hosted, "${{ matrix.os }}"]
container: ${{ matrix.container }}

steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Prepare runner
uses: ./.github/actions/prepare_runner
with:
disable_ccache: true

- name: Setup conan
uses: ./.github/actions/setup_conan
id: conan

- name: Run conan and cmake
uses: ./.github/actions/generate
with:
conan_profile: ${{ steps.conan.outputs.conan_profile }}
conan_cache_hit: ${{ steps.restore_cache.outputs.conan_cache_hit }}
build_type: ${{ matrix.build_type }}

- name: Build Clio
uses: ./.github/actions/build_clio

- name: Strip tests
run: strip build/clio_tests
# - uses: actions/download-artifact@v3
# with:
# name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
#
# - name: Run clio_tests
# run: |
# chmod +x ./clio_tests
# ./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
- name: Make mock artifacts
shell: bash
run: |
mkdir build
echo 'test' > build/clio_tests
echo 'test' > build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz
- name: Upload clio_tests
uses: actions/upload-artifact@v3
with:
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}
path: build/clio_tests

- name: Compress clio_server
shell: bash
run: |
cd build
tar czf ./clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz ./clio_server
- name: Upload clio_server
uses: actions/upload-artifact@v3
with:
name: clio_server_${{ runner.os }}_${{ matrix.build_type }}
path: build/clio_server_${{ runner.os }}_${{ matrix.build_type }}.tar.gz


run_tests:
needs: build
strategy:
fail-fast: false
matrix:
include:
- os: macOS
build_type: Release
- os: Linux
build_type: Release
- os: Linux
build_type: Debug
runs-on: [self-hosted, "${{ matrix.os }}"]

steps:
- uses: actions/download-artifact@v3
with:
name: clio_tests_${{ runner.os }}_${{ matrix.build_type }}

- name: Run clio_tests
run: |
chmod +x ./clio_tests
./clio_tests --gtest_filter="-BackendCassandraBaseTest*:BackendCassandraTest*:BackendCassandraFactoryTestWithDB*"
nightly_release:
needs: run_tests
runs-on: ubuntu-20.04
Expand All @@ -108,23 +125,31 @@ jobs:
permissions:
contents: write
steps:
- uses: actions/checkout@v4

- uses: actions/download-artifact@v3
with:
path: nightly_release

- name: Prepare files
shell: bash
run: |
cd nightly_release
rm -r clio_tests*
CLIO_SHA256_SUMS=''
for d in $(ls); do
archive_name=$(ls $d)
mv ${d}/${archive_name} ./
rm -r $d
sha256sum ./$archive_name > ./$archive_name.sha256sum
sha256sum ./$archive_name > ./${archive_name}.sha256sum
echo -e "$(cat ./${archive_name}.sha256sum)\n${CLIO_SHA256_SUMS}"
done
echo $CLIO_SHA256_SUMS >> $GITHUB_ENV
- name: Publish nightly release
shell: bash
run: |
gh release create nightly --prerelease --title "Clio development (nightly) build" --target $GITHUB_SHA --generate-notes ./clio_server*
gh release create nightly --prerelease --title "Clio development (nightly) build" --target $GITHUB_SHA --notes-file "${{ github.workspace }}/.github/workflows/nightly_notes.md" ./clio_server*
12 changes: 12 additions & 0 deletions .github/workflows/nightly_notes.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
```
Based on commit: $GITHUB_SH
```

> **Note:** Please remember that this is a development release and it is not recommended for production use.
Changelog (including previous releases): https://github.com/kuznetsss/clio/commits/nightly

## SHA256 checksums
```
$(CLIO_SHA256_SUMS)
```

0 comments on commit a41c1f6

Please sign in to comment.