Skip to content

Update actions/upload-artifact to v4 in build workflow #90

Update actions/upload-artifact to v4 in build workflow

Update actions/upload-artifact to v4 in build workflow #90

Workflow file for this run

name: Build hakoniwa-conductor
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
steps:
- name: Setup cmake
uses: jwlawson/actions-setup-cmake@v2
- name: Setup Python
uses: actions/setup-python@v5
with:
python-version: '3.10'
- name: Install Protoc
uses: arduino/setup-protoc@v3
- name: Install rust toolchain
uses: dtolnay/rust-toolchain@stable
- name: Install target Dependencies
if: matrix.os == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libc++-dev libc++abi-dev
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Build hakoniwa-core-cpp-client
run: |
echo "OS_NAME=$(uname -s)" >> $GITHUB_ENV
echo "OS_ARCH=$(uname -m)" >> $GITHUB_ENV
git clone --recursive https://github.com/toppers/hakoniwa-core-cpp-client.git
cd hakoniwa-core-cpp-client
bash build.bash
bash install.bash
# - name: Archive hakoniwa-core-cpp-client
# run: |
# tar -czf hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz /usr/local/bin/hakoniwa /usr/local/lib/hakoniwa /var/lib/hakoniwa /etc/hakoniwa
# echo "ARTIFACT_HAKONIWA-CORE-CPP-CLIENT=hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" >> $GITHUB_ENV
- name: Build hakoniwa-conductor
run: |
cd main
bash build.bash
sudo cp ./target/debug/main /usr/local/bin/hakoniwa/hako-master-rust
sudo cp hako-master /usr/local/bin/hakoniwa/hako-master
sudo cp hako-cleanup /usr/local/bin/hakoniwa/hako-cleanup
sudo chmod +x /usr/local/bin/hakoniwa/hako-master
sudo chmod +x /usr/local/bin/hakoniwa/hako-cleanup
cd ../
tar -cvzf hakoniwa-conductor_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz /usr/local/bin/hakoniwa /usr/local/lib/hakoniwa /var/lib/hakoniwa /etc/hakoniwa
echo "ARTIFACT_HAKONIWA-CONDUCTOR=hakoniwa-conductor_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" >> $GITHUB_ENV
- name: upload Artifact
uses: actions/upload-artifact@v4
with:
name: hakoniwa-conductor_${{ env.OS_NAME }}_${{ env.OS_ARCH }}
path: |
${{ env.ARTIFACT_HAKONIWA-CONDUCTOR }}
retention-days: 5