Files
openobserve/.github/workflows/release.yml
T
mmosarafO2 032273ac87 ci: updated openobserve binary path (#7517)
### **User description**
updated openobserve binary path on S3


___

### **PR Type**
Other


___

### **Description**
- Add 'openobserve' subdirectory to S3 path

- Update upload destination for release artifacts


___



### **Changes walkthrough** 📝
<table><thead><tr><th></th><th align="left">Relevant
files</th></tr></thead><tbody><tr><td><strong>Configuration
changes</strong></td><td><table>
<tr>
  <td>
    <details>
<summary><strong>release.yml</strong><dd><code>Update S3 artifact upload
path</code>&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
</dd></summary>
<hr>

.github/workflows/release.yml

<li>Updated S3 upload path for artifacts<br> <li> Added 'openobserve'
folder to release path


</details>


  </td>
<td><a
href="https://github.com/openobserve/openobserve/pull/7517/files#diff-87db21a973eed4fef5f32b267aa60fcee5cbdf03c67fafdc2a9b553bb0b15f34">+2/-2</a>&nbsp;
&nbsp; &nbsp; </td>

</tr>
</table></td></tr></tr></tbody></table>

___

> <details> <summary> Need help?</summary><li>Type <code>/help how to
...</code> in the comments thread for any questions about PR-Agent
usage.</li><li>Check out the <a
href="https://qodo-merge-docs.qodo.ai/usage-guide/">documentation</a>
for more information.</li></details>
2025-07-10 11:50:55 +05:30

209 lines
7.8 KiB
YAML

on:
push:
tags:
- "v*.*.*"
name: Release
env:
RUST_TOOLCHAIN: nightly-2025-03-02
jobs:
build:
name: Build binary
strategy:
matrix:
include:
- arch: x86_64-unknown-linux-gnu
os: ubuntu-2204-8-cores
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-linux-amd64
file_ext: .tar.gz
- arch: x86_64-unknown-linux-gnu
os: ubuntu-2204-8-cores
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-linux-amd64-simd
file_ext: .tar.gz
- arch: x86_64-unknown-linux-musl
os: ubuntu-2204-8-cores
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-linux-amd64-musl
file_ext: .tar.gz
# - arch: aarch64-unknown-linux-musl
# os: ubuntu-2204-8-cores
# features: "--features mimalloc"
# file_name: openobserve-${{ github.ref_name }}-linux-arm64-musl
# file_ext: .tar.gz
- arch: aarch64-unknown-linux-gnu
os: ubuntu-2204-8-cores
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-linux-arm64
file_ext: .tar.gz
- arch: x86_64-apple-darwin
os: macos-latest
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-darwin-amd64
file_ext: .tar.gz
- arch: aarch64-apple-darwin
os: macos-latest
features: "--features mimalloc"
file_name: openobserve-${{ github.ref_name }}-darwin-arm64
file_ext: .tar.gz
- arch: x86_64-pc-windows-msvc
os: windows-2022-16-cores
features: ""
file_name: openobserve-${{ github.ref_name }}-windows-amd64
file_ext: .zip
runs-on: ${{ matrix.os }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Cache cargo assets
id: cache
uses: actions/cache@v4
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ matrix.arch }}-build-cargo-${{ hashFiles('**/Cargo.lock') }}
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 22.x
cache: "npm"
cache-dependency-path: web/package-lock.json
- name: Build UI
env:
NODE_OPTIONS: "--max-old-space-size=8192"
run: |
cd web/
npm install
npm run build
- name: Install Protoc for linux
if: contains(matrix.arch, 'linux')
run: | # Make sure the protoc is >= 3.15
wget https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-linux-x86_64.zip
unzip protoc-21.12-linux-x86_64.zip -d protoc
sudo cp protoc/bin/protoc /usr/local/bin/
sudo cp -r protoc/include/google /usr/local/include/
- name: Install Protoc for windows
if: contains(matrix.arch, 'windows')
shell: bash
run: |
curl -L -o protoc-21.12-win64.zip https://github.com/protocolbuffers/protobuf/releases/download/v21.12/protoc-21.12-win64.zip
unzip protoc-21.12-win64.zip -d protoc
cp protoc/bin/protoc.exe C:/windows/system32/protoc.exe
cp -r protoc/include/google C:/windows/system32/
- name: Install Protoc for macos
if: contains(matrix.arch, 'darwin')
run: |
brew install protobuf
- name: Install dependencies for linux
if: contains(matrix.arch, 'linux-gnu')
run: |
sudo apt-get -y update
sudo apt-get -y install libssl-dev pkg-config g++-aarch64-linux-gnu gcc-aarch64-linux-gnu
- name: Install dependencies for linux
if: contains(matrix.arch, 'linux-musl')
run: |
sudo apt-get -y update
sudo apt-get -y install libssl-dev pkg-config g++-aarch64-linux-gnu gcc-aarch64-linux-gnu musl-dev musl-tools
sudo ln -s "/usr/bin/g++" "/usr/bin/musl-g++"
- name: Install rust toolchain
uses: actions-rs/toolchain@v1
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
target: ${{ matrix.arch }}
override: true
- name: Output package versions
run: protoc --version ; cargo version ; rustc --version ; gcc --version ; g++ --version
- name: Print rustc cfg
run: rustc -C target-cpu=native --print cfg
- name: Run cargo build
if: contains(matrix.file_name, '-simd') == false
run: cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}
- name: Run cargo build
if: contains(matrix.file_name, '-simd')
run: RUSTFLAGS='-C target-feature=+aes,+avx,+avx2,+sse2,+sse3,+ssse3,+sse4.1,+sse4.2,+avx512f,+avx512cd,+avx512bw,+avx512dq,+avx512vl' cargo build ${{ matrix.features }} --profile release-prod --target ${{ matrix.arch }}
- name: Calculate checksum and rename binary
if: contains(matrix.arch, 'windows') == false
shell: bash
run: |
cd target/${{ matrix.arch }}/release-prod
chmod +x openobserve
tar -zcvf ${{ matrix.file_name }}.tar.gz openobserve
echo $(shasum -a 256 ${{ matrix.file_name }}.tar.gz | cut -f1 -d' ') > ${{ matrix.file_name }}.tar.gz.sha256sum
- name: Calculate checksum and rename binary for windows
if: contains(matrix.arch, 'windows')
shell: bash
run: |
cd target/${{ matrix.arch }}/release-prod
7z a -tzip ${{ matrix.file_name }}.zip openobserve.exe
certutil.exe -hashfile ${{ matrix.file_name }}.zip sha256|head -n 2|tail -n 1 > ${{ matrix.file_name }}.zip.sha256sum
- name: Upload artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file_name }}
path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}
- name: Upload checksum of artifacts
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.file_name }}.sha256sum
path: target/${{ matrix.arch }}/release-prod/${{ matrix.file_name }}${{ matrix.file_ext }}.sha256sum
release:
name: Release artifacts
needs: [build]
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Download artifacts
uses: actions/download-artifact@v4
- name: Upload to S3
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ vars.AWS_S3_REGION }}
BUCKET: ${{ vars.AWS_S3_BUCKET_NAME }}
run: |
if ! command -v aws &> /dev/null; then
echo "AWS CLI not found. Installing..."
curl "https://awscli.amazonaws.com/awscli-exe-linux-x86_64.zip" -o "awscliv2.zip"
unzip awscliv2.zip
sudo ./aws/install
else
echo "AWS CLI already installed."
fi
echo "Uploading artifacts to S3..."
for file in $(find . -type f \( -name "openobserve*.tar.gz" -o -name "*.zip" -o -name "openobserve*.sha256sum" \)); do
echo "Uploading $file to s3://${BUCKET}/releases/openobserve/${GITHUB_REF_NAME}/"
aws s3 cp "$file" "s3://${BUCKET}/releases/openobserve/${GITHUB_REF_NAME}/$(basename "$file")"
done
- name: Publish release
uses: softprops/action-gh-release@v2
with:
name: "Release ${{ github.ref_name }}"
generate_release_notes: true
files: |
**/openobserve-*