Skip to content

Refactor URL query parameter filtering for task ID consistency (#2014) #461

Refactor URL query parameter filtering for task ID consistency (#2014)

Refactor URL query parameter filtering for task ID consistency (#2014) #461

Workflow file for this run

name: Release
on:
push:
tags:
- v*
jobs:
build:
runs-on:
group: Default
labels: ${{ matrix.runner }}
timeout-minutes: 480
strategy:
matrix:
include:
- runner: [oracle-vm-24cpu-96gb-x86-64]
target: x86_64-unknown-linux-gnu
- runner: [oracle-vm-24cpu-96gb-x86-64]
target: x86_64-unknown-linux-musl
- runner: [oracle-vm-32cpu-128gb-arm64]
target: aarch64-unknown-linux-gnu
- runner: [oracle-vm-32cpu-128gb-arm64]
target: aarch64-unknown-linux-musl
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v7
- uses: Swatinem/rust-cache@v2
with:
key: ${{ matrix.target }}
cache-on-failure: true
- name: Get the release version from the tag
shell: bash
run: echo "VERSION=${GITHUB_REF#refs/tags/}" >> $GITHUB_ENV
- name: Fix Cargo/Rustup permissions (self-hosted)
shell: bash
run: |
sudo chown -R "$USER":"$USER" "$HOME/.cargo" "$HOME/.rustup" 2>/dev/null || true
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
targets: ${{ matrix.target }}
- name: Install cross-compilation tools
uses: taiki-e/setup-cross-toolchain-action@v1
with:
target: ${{ matrix.target }}
- name: Install cargo-deb
uses: taiki-e/cache-cargo-install-action@9ee83daaa7b96a6fab930949ecf1122bba04a389
with:
# Don't upgrade cargo-deb, refer to https://github.com/kornelski/cargo-deb/issues/169.
tool: cargo-deb@2.10.0
- name: Install cargo-generate-rpm
uses: taiki-e/install-action@ba47c86ac325773530516bb756137ac718732518
with:
tool: cargo-generate-rpm@0.16.0
- name: Install dependencies
run: |
sudo apt-get update -y
sudo apt-get install -y protobuf-compiler libclang-dev
- name: Build binaries
shell: bash
run: |
cargo build --release --bins --workspace --exclude hdfs --target ${{ matrix.target }}
- name: Build archive client(DEB)
shell: bash
run: |
binary_name="dragonfly-client"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
cargo deb -p dragonfly-client --no-build --target ${{ matrix.target }} --variant ${{ matrix.target }} --compress-type gzip --output $dirname.deb
echo "CLIENT_DEB_ASSET=$dirname.deb" >> $GITHUB_ENV
- name: Build archive client(RPM)
shell: bash
run: |
binary_name="dragonfly-client"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
cargo generate-rpm -p dragonfly-client --target ${{ matrix.target }} --variant ${{ matrix.target }} --payload-compress none --output $dirname.rpm
echo "CLIENT_RPM_ASSET=$dirname.rpm" >> $GITHUB_ENV
- name: Build archive client(TAR)
shell: bash
run: |
binary_name="dragonfly-client"
dirname="$binary_name-${{ env.VERSION }}-${{ matrix.target }}"
mkdir -p "$dirname"
mv "target/${{ matrix.target }}/release/dfget" "$dirname"
mv "target/${{ matrix.target }}/release/dfdaemon" "$dirname"
mv "target/${{ matrix.target }}/release/dfcache" "$dirname"
mv "target/${{ matrix.target }}/release/dfstore" "$dirname"
mv "target/${{ matrix.target }}/release/dfctl" "$dirname"
mv "target/${{ matrix.target }}/release/dfinit" "$dirname"
mv CONTRIBUTING.md LICENSE README.md "$dirname"
tar -czf "$dirname.tar.gz" "$dirname"
echo "CLIENT_TAR_ASSET=$dirname.tar.gz" >> $GITHUB_ENV
- name: Upload Release Artifacts
uses: actions/upload-artifact@v6
with:
name: release-${{ matrix.target }}
path: |
${{ env.CLIENT_RPM_ASSET }}
${{ env.CLIENT_DEB_ASSET }}
${{ env.CLIENT_TAR_ASSET }}
release-github:
runs-on: ubuntu-latest
timeout-minutes: 360
needs: [build]
permissions:
contents: write
steps:
- name: Download Release Artifacts
uses: actions/download-artifact@v7
with:
path: releases
pattern: release-*
merge-multiple: true
- name: Release
uses: ncipollo/release-action@v1
with:
artifacts: 'releases/*'
generateReleaseNotes: true
allowUpdates: true
draft: true
publish-crates:
runs-on:
group: Default
labels: [oracle-vm-24cpu-96gb-x86-64]
timeout-minutes: 360
steps:
- name: Free Disk Space (Ubuntu)
uses: jlumbroso/free-disk-space@main
with:
tool-cache: false
android: true
dotnet: true
haskell: true
large-packages: true
docker-images: true
swap-storage: true
- name: Checkout
uses: actions/checkout@v7
- name: Install Rust
uses: dtolnay/rust-toolchain@stable
with:
toolchain: 1.88.0
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install protobuf-compiler libclang-dev
- uses: katyo/publish-crates@v2
with:
registry-token: ${{ secrets.CARGO_REGISTRY_TOKEN }}
ignore-unpublished-changes: true
args: --locked