Skip to content

added cute icon, deprecate the measure branch. #349

added cute icon, deprecate the measure branch.

added cute icon, deprecate the measure branch. #349

Workflow file for this run

name: build
on:
push:
jobs:
build:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-20.04, macos-latest, macos-13, windows-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: Setup Visual Studio environment
if: matrix.os == 'windows-latest'
uses: ilammy/msvc-dev-cmd@v1
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
- name: Hakoniwa-core
shell: bash
run: |
echo "OS_NAME=$(uname -s)" >> $GITHUB_ENV
echo "OS_ARCH=$(uname -m)" >> $GITHUB_ENV
bash build.bash
- name: Hakoniwa-core archive
if: matrix.os != 'windows-latest'
shell: bash
run: |
bash install.bash
tar -czf hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz /usr/local/bin/hakoniwa /usr/local/lib/hakoniwa /usr/local/include/hakoniwa /var/lib/hakoniwa /etc/hakoniwa
ls -la
echo "ARTIFACT_ARCHIVE_PATH=hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" >> $GITHUB_ENV
- name: Hakoniwa-core archive
if: matrix.os == 'windows-latest'
shell: bash
run: |
bash install.bash
tar -czf hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz ../local/bin/hakoniwa ../local/lib/hakoniwa ../local/include/hakoniwa ../hakoniwa
ls -la
echo "ARTIFACT_ARCHIVE_PATH=hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}.tar.gz" >> $GITHUB_ENV
- name: Artifact Name for ubuntu
if: matrix.os == 'ubuntu-latest'
run: |
echo "ARTIFACT_NAME=libshakoc.so" >> $GITHUB_ENV
echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.so" >> $GITHUB_ENV
- name: Artifact Name for mac
if: matrix.os == 'macos-latest'
run: |
echo "ARTIFACT_NAME=libshakoc.dylib" >> $GITHUB_ENV
echo "ARTIFACT_PATH=cmake-build/src/hakoc/libshakoc.dylib" >> $GITHUB_ENV
- name: Artifact Name for Windows
if: matrix.os == 'windows-latest'
run: |
echo "ARTIFACT_NAME=hakoc.lib" >> $GITHUB_ENV
echo "ARTIFACT_PATH=cmake-build/src/hakoc/Release/hakoc.lib" >> $GITHUB_ENV
- name: upload Artifact
uses: actions/upload-artifact@v4
with:
name: hakoniwa-core-cpp-client_${{ env.OS_NAME }}_${{ env.OS_ARCH }}_${{ matrix.os }}
path: |
${{env.ARTIFACT_PATH}}
${{env.ARTIFACT_ARCHIVE_PATH}}
retention-days: 5
- name: Publish archives and packages
if: startsWith(github.ref, 'refs/tags/v')
uses: softprops/action-gh-release@v2
with:
files: |
${{ env.ARTIFACT_PATH }}
${{ env.ARTIFACT_ARCHIVE_PATH }}