Skip to content

bump v0.23.3

bump v0.23.3 #246

Workflow file for this run

on:
push:
# Pattern matched against refs/tags
tags:
- "*"
env:
AWS_REGION: us-west-1
AWS_ROLE: ${{ vars.EC2_GITHUB_RUNNER_ROLE }}
REGISTRY_IMAGE: oxen/oxen-server
permissions:
id-token: write
contents: write
jobs:
start-self-hosted-runner:
name: Start self-hosted EC2 runner
runs-on: ubuntu-latest
outputs:
label: ${{ steps.start-ec2-runner.outputs.label }}
ec2-instance-id: ${{ steps.start-ec2-runner.outputs.ec2-instance-id }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE }}
role-duration-seconds: 900
aws-region: ${{ env.AWS_REGION }}
- name: Start EC2 runner
id: start-ec2-runner
uses: machulav/ec2-github-runner@v2
with:
mode: start
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
ec2-image-id: ${{ vars.EC2_IMAGE_ID }}
ec2-instance-type: m7g.4xlarge
subnet-id: ${{ vars.SUBNET_ID }}
security-group-id: ${{ vars.SECURITY_GROUP_ID }}
aws-resource-tags: >
[
{"Key": "Name", "Value": "ec2-github-runner"}
]
release_ubuntu_latest:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install system dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev \
libavutil-dev libavformat-dev libavdevice-dev libavfilter-dev \
libswscale-dev libswresample-dev libpostproc-dev libssl-dev pkg-config \
ruby ruby-dev rubygems build-essential \
&& sudo gem install fpm
- name: Build oxen
run: cargo build --release
- name: Package Oxen Server
run: |
fpm \
-s dir -t deb \
-p oxen-server-ubuntu-latest.deb \
-C target/release \
--name oxen-server \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "oxen-server is the server for oxen to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen-server=/usr/bin/oxen-server
- name: Package Oxen CLI
run: |
fpm \
-s dir -t deb \
-p oxen-ubuntu-latest.deb \
-C target/release \
--name oxen \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "Oxen is a command line tool to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen=/usr/bin/oxen
- name: Upload Oxen Server binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-server-ubuntu-latest.deb
asset_name: oxen-server-ubuntu-latest.deb
tag: ${{ github.ref }}
- name: Upload Oxen CLI binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-ubuntu-latest.deb
asset_name: oxen-ubuntu-latest.deb
tag: ${{ github.ref }}
- name: Upload to crates.io
run: |
cd src/lib
cargo login ${{ secrets.CRATES_IO_TOKEN }}
cargo publish
release_ubuntu_22_04:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install system dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev \
libavutil-dev libavformat-dev libavdevice-dev libavfilter-dev \
libswscale-dev libswresample-dev libpostproc-dev libssl-dev pkg-config \
ruby ruby-dev rubygems build-essential \
&& sudo gem install fpm
- name: Build oxen
run: cargo build --release
- name: Package Oxen Server
run: |
fpm \
-s dir -t deb \
-p oxen-server-ubuntu-22.04.deb \
-C target/release \
--name oxen-server \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "oxen-server is the server for oxen to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen-server=/usr/bin/oxen-server
- name: Package Oxen CLI
run: |
fpm \
-s dir -t deb \
-p oxen-ubuntu-22.04.deb \
-C target/release \
--name oxen \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "Oxen is a command line tool to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen=/usr/bin/oxen
- name: Upload Oxen Server binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-server-ubuntu-22.04.deb
asset_name: oxen-server-ubuntu-22.04.deb
tag: ${{ github.ref }}
- name: Upload Oxen CLI binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-ubuntu-22.04.deb
asset_name: oxen-ubuntu-22.04.deb
tag: ${{ github.ref }}
release_ubuntu_20_04:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Install system dependencies
run: |
sudo apt-get update \
&& sudo apt-get install -y \
libdbus-1-dev \
libavutil-dev libavformat-dev libavdevice-dev libavfilter-dev \
libswscale-dev libswresample-dev libpostproc-dev libssl-dev pkg-config \
ruby ruby-dev rubygems build-essential \
&& sudo gem install fpm
# - name: Install mold linker
# run: |
# git clone https://github.com/rui314/mold.git
# mkdir mold/build
# cd mold/build
# git checkout v2.0.0
# ../install-build-deps.sh
# cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_CXX_COMPILER=c++ ..
# cmake --build . -j $(nproc)
# sudo cmake --install .
# - name: Install imagemagick
# run: |
# export MAGICK_VERSION=7.1 \
# && curl https://imagemagick.org/archive/ImageMagick.tar.gz | tar xz \
# && cd ImageMagick-${MAGICK_VERSION}* \
# && ./configure --with-magick-plus-plus=no --with-perl=no \
# && make \
# && sudo make install \
# && cd .. \
# && rm -r ImageMagick-${MAGICK_VERSION}*
- name: Build oxen
run: |
cargo build --release
- name: Package Oxen Server
run: |
fpm \
-s dir -t deb \
-p oxen-server-ubuntu-20.04.deb \
-C target/release \
--name oxen-server \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "oxen-server is the server for oxen to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen-server=/usr/bin/oxen-server
- name: Package Oxen CLI
run: |
fpm \
-s dir -t deb \
-p oxen-ubuntu-20.04.deb \
-C target/release \
--name oxen \
--version ${{ env.RELEASE_VERSION }} \
--architecture all \
--description "Oxen is a command line tool to version and manage large machine learning datasets" \
--url "https://oxen.ai" \
--maintainer "OxenAI [email protected]" \
oxen=/usr/bin/oxen
- name: Upload Oxen Server binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-server-ubuntu-20.04.deb
asset_name: oxen-server-ubuntu-20.04.deb
tag: ${{ github.ref }}
- name: Upload Oxen CLI binary to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-ubuntu-20.04.deb
asset_name: oxen-ubuntu-20.04.deb
tag: ${{ github.ref }}
release_windows_latest:
runs-on: windows-latest
env:
FFMPEG_DOWNLOAD_URL: https://www.gyan.dev/ffmpeg/builds/ffmpeg-release-full-shared.7z
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install ffmpeg dependencies
run: |
$VCINSTALLDIR = $(& "${env:ProgramFiles(x86)}\Microsoft Visual Studio\Installer\vswhere.exe" -latest -property installationPath)
Add-Content $env:GITHUB_ENV "LIBCLANG_PATH=${VCINSTALLDIR}\VC\Tools\LLVM\x64\bin`n"
Invoke-WebRequest "${env:FFMPEG_DOWNLOAD_URL}" -OutFile ffmpeg-release-full-shared.7z
7z x ffmpeg-release-full-shared.7z
mkdir ffmpeg
mv ffmpeg-*/* ffmpeg/
Add-Content $env:GITHUB_ENV "FFMPEG_DIR=${pwd}\ffmpeg`n"
Add-Content $env:GITHUB_PATH "${pwd}\ffmpeg\bin`n"
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
- name: Build
run: cargo build --release --bins
- name: Upload oxen.exe windows to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen.exe
asset_name: oxen.exe
tag: ${{ github.ref }}
- name: Upload oxen-server.exe windows to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-server.exe
asset_name: oxen-server.exe
tag: ${{ github.ref }}
release_docker:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t oxen/oxen-server .
- name: Save Docker
run: docker save oxen/oxen-server -o oxen-server-docker.tar
- name: Upload docker to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-server-docker.tar
asset_name: oxen-server-docker.tar
tag: ${{ github.ref }}
release_docker_arm64:
needs: start-self-hosted-runner
runs-on: ${{ needs.start-self-hosted-runner.outputs.label }}
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Build Docker Image
run: docker build -t oxen/oxen-server .
- name: Save Docker
run: docker save oxen/oxen-server -o oxen-server-docker-arm64.tar
- name: Upload docker to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: oxen-server-docker-arm64.tar
asset_name: oxen-server-docker-arm64.tar
tag: ${{ github.ref }}
release_mac_13:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
- name: Build oxen for mac
run: cargo build --release
- name: Tar.gz oxen for mac
run: cd target/release && tar -czf oxen-mac-13.0.tar.gz oxen && cd -
- name: Tar.gz oxen-server for mac
run: cd target/release && tar -czf oxen-server-mac-13.0.tar.gz oxen-server && cd -
- name: Upload oxen to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-mac-13.0.tar.gz
asset_name: oxen-mac-13.0.tar.gz
tag: ${{ github.ref }}
- name: Upload oxen-server to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-server-mac-13.0.tar.gz
asset_name: oxen-server-mac-13.0.tar.gz
tag: ${{ github.ref }}
release_mac_14:
runs-on: macos-14
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
- name: Build oxen for mac
run: cargo build --release
- name: Tar.gz oxen for mac
run: cd target/release && tar -czf oxen-mac-14.0.tar.gz oxen && cd -
- name: Tar.gz oxen-server for mac
run: cd target/release && tar -czf oxen-server-mac-14.0.tar.gz oxen-server && cd -
- name: Upload oxen to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-mac-14.0.tar.gz
asset_name: oxen-mac-14.0.tar.gz
tag: ${{ github.ref }}
- name: Upload oxen-server to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-server-mac-14.0.tar.gz
asset_name: oxen-server-mac-14.0.tar.gz
tag: ${{ github.ref }}
release_mac_15:
runs-on: macos-15
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set env
run: echo "RELEASE_VERSION=${GITHUB_REF#refs/*/v}" >> $GITHUB_ENV
- name: Install latest rust toolchain
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
target: x86_64-apple-darwin
- name: Build oxen for mac
run: cargo build --release
- name: Tar.gz oxen for mac
run: cd target/release && tar -czf oxen-mac-15.0.tar.gz oxen && cd -
- name: Tar.gz oxen-server for mac
run: cd target/release && tar -czf oxen-server-mac-15.0.tar.gz oxen-server && cd -
- name: Upload oxen to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-mac-15.0.tar.gz
asset_name: oxen-mac-15.0.tar.gz
tag: ${{ github.ref }}
- name: Upload oxen-server to release
uses: svenstaro/upload-release-action@v2
with:
release_name: "πŸ‚ Release ${{ github.ref }}"
repo_token: ${{ secrets.GITHUB_TOKEN }}
file: target/release/oxen-server-mac-15.0.tar.gz
asset_name: oxen-server-mac-15.0.tar.gz
tag: ${{ github.ref }}
stop-self-hosted-runner:
name: Stop self-hosted EC2 runner
needs:
- start-self-hosted-runner
- release_docker_arm64
runs-on: ubuntu-latest
if: ${{ always() }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: ${{ env.AWS_ROLE }}
role-duration-seconds: 900
aws-region: ${{ env.AWS_REGION }}
- name: Stop EC2 runner
uses: machulav/ec2-github-runner@v2
with:
mode: stop
github-token: ${{ secrets.GH_PERSONAL_ACCESS_TOKEN }}
label: ${{ needs.start-self-hosted-runner.outputs.label }}
ec2-instance-id: ${{ needs.start-self-hosted-runner.outputs.ec2-instance-id }}