Skip to content

feat: ✨ add voice support; rename BOOST_OUTCOME_TRY to EKIZU… #38

feat: ✨ add voice support; rename BOOST_OUTCOME_TRY to EKIZU…

feat: ✨ add voice support; rename BOOST_OUTCOME_TRY to EKIZU… #38

Workflow file for this run

name: ekizu CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

No steps defined in `steps` and no workflow called in `uses` for the following jobs: windows
on:
push:
branches:
- main
- dev
paths:
- "**ci.yml"
- "**.hpp"
- "**.cpp"
- "**CMakeLists.txt"
pull_request:
branches:
- main
- dev
paths:
- "**ci.yml"
- "**.hpp"
- "**.cpp"
- "**CMakeLists.txt"
env:
BRANCH_NAME: ${{ github.ref == 'refs/heads/dev' && 'dev' || 'main' }}
PRERELEASE: ${{ github.ref == 'refs/heads/dev' && 'true' || 'false' }}
TAG_SUFFIX: ${{ github.ref == 'refs/heads/dev' && '-dev' || '' }}
jobs:
changes:
runs-on: ubuntu-22.04
outputs:
build: ${{ steps.filter.outputs.src }}
steps:
- name: Checkout
if: github.event_name == 'push'
uses: actions/checkout@v3
- uses: dorny/paths-filter@v2
id: filter
with:
base: ${{ env.BRANCH_NAME }}
filters: |
src:
- '**/*.cpp'
- '**/*.hpp'
- '**/CMakeLists.txt'
linux:
needs: changes
name: Linux ${{ matrix.arch }} (${{ matrix.gcc-version }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
arch: [amd64]
gcc-version: ["g++-9"]
os: ["ubuntu-22.04"]
if: needs.changes.outputs.build == 'true'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Install dependencies
run: sudo apt update && sudo apt install -y cmake ${{ matrix.gcc-version }} libssl-dev ninja-build rpm zlib1g-dev
- name: Install boost
uses: MarkusJx/[email protected]
id: install-boost
with:
boost_version: 1.81.0
- name: Configure CMake
run: cmake -S . -B build -G Ninja
if: matrix.gcc-version != 'g++-12'
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
CXX: ${{ matrix.gcc-version }}
- name: Configure CMake (g++-12)
run: cmake -S . -B build -G Ninja -Dekizu_WARNINGS_AS_ERRORS=OFF
if: matrix.gcc-version == 'g++-12'
env:
BOOST_ROOT: ${{ steps.install-boost.outputs.BOOST_ROOT }}
CXX: ${{ matrix.gcc-version }}
- name: Build
run: cmake --build build --config Release
- name: Package
run: cd build && cpack --verbose
- name: Upload Binary (DEB)
uses: actions/upload-artifact@v3
with:
name: "libekizu - Debian Package ${{ matrix.arch }}"
path: "${{ github.workspace }}/build/*.deb"
- name: Upload Binary (RPM)
uses: actions/upload-artifact@v3
with:
name: "libekizu - RPM Package ${{ matrix.arch }}"
path: "${{ github.workspace }}/build/*.rpm"
windows:
# needs: changes
# strategy:
# fail-fast: false
# matrix:
# arch: [x64, x86]
# config: [Release, Debug]
# vs:
# - { name: 2019, version: 16, os: windows-2019 }
# - { name: 2022, version: 17, os: windows-2022 }
# if: needs.changes.outputs.build == 'true'
# name: "Windows ${{ matrix.arch }}-${{ matrix.config }}-vs${{ matrix.vs.name }}"
runs-on: ${{ matrix.vs.os }}
# steps:
# - name: Checkout
# uses: actions/checkout@v3
# - name: Add MSBuild to PATH
# uses: microsoft/[email protected]
# - name: Install OpenSSL
# uses: johnwason/vcpkg-action@v5
# id: vcpkg
# with:
# pkgs: openssl zlib
# triplet: ${{ matrix.arch }}-windows-static
# cache-key: ${{ runner.os }}-${{ matrix.arch }}-vcpkg
# token: ${{ github.token }}
# - name: Configure CMake (x64)
# if: ${{ matrix.arch == 'x64' }}
# run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -S . -B build -G "Visual Studio ${{ matrix.vs.version }} ${{ matrix.vs.name }}" -A x64 -T host=x64
# - name: Configure CMake (x86)
# if: ${{ matrix.arch == 'x86' }}
# run: cmake ${{ steps.vcpkg.outputs.vcpkg-cmake-config }} -S . -B build -G "Visual Studio ${{ matrix.vs.version }} ${{ matrix.vs.name }}" -A Win32 -T host=x86
# - name: Build
# run: cmake --build build --config ${{ matrix.config }}
# - name: Package
# run: cd build && cpack -C ${{ matrix.config }} --verbose
# - name: Upload Binary
# uses: actions/upload-artifact@v3
# with:
# name: "libekizu - Windows ${{ matrix.arch }}-${{ matrix.config }}-vs${{ matrix.vs.name }}"
# path: "${{ github.workspace }}/build/*.zip"
release:
# needs: [linux, windows]
runs-on: ubuntu-22.04
if: github.event_name == 'push'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Get tags
run: git fetch --tags origin
- name: Get Latest Tag
id: latest-tag
run: |
echo "BRANCH_NAME: $BRANCH_NAME"
if [[ "$BRANCH_NAME" == 'dev' ]]; then
latest_tag=$(git tag -l | grep "\-dev" | sort -V | tail -n 1 || true)
else
latest_tag=$(git tag -l | grep -v "\-dev" | sort -V | tail -n 1 || true)
fi
echo "Current Tag: $latest_tag"
echo "::set-output name=tag::$latest_tag"
shell: bash
- name: Get Next Version
id: semver
uses: ietf-tools/semver-action@v1
with:
token: ${{ github.token }}
branch: ${{ env.BRANCH_NAME }}
fromTag: ${{ steps.latest-tag.outputs.tag }}
- name: Create Draft Release
uses: ncipollo/[email protected]
with:
prerelease: ${{ env.PRERELEASE }}
draft: false
commit: ${{ github.sha }}
tag: ${{ steps.semver.outputs.next }}${{ env.TAG_SUFFIX }}
name: ${{ steps.semver.outputs.next }}${{ env.TAG_SUFFIX }}
body: "*pending*"
token: ${{ github.token }}
- name: Update CHANGELOG
id: changelog
uses: requarks/changelog-action@v1
with:
token: ${{ github.token }}
fromTag: ${{ steps.semver.outputs.next }}${{ env.TAG_SUFFIX }}
toTag: ${{ steps.latest-tag.outputs.tag }}
writeToFile: false
- name: Create Release
uses: ncipollo/[email protected]
with:
prerelease: ${{ env.PRERELEASE }}
allowUpdates: true
draft: false
makeLatest: true
commit: ${{ github.sha }}
tag: ${{ steps.semver.outputs.next }}${{ env.TAG_SUFFIX }}
name: ${{ steps.semver.outputs.next }}${{ env.TAG_SUFFIX }}
body: ${{ steps.changelog.outputs.changes }}
token: ${{ github.token }}
outputs:
next: ${{ steps.semver.outputs.next }}
upload:
needs: release
runs-on: ubuntu-22.04
if: github.event_name == 'push'
steps:
- name: Download all artifacts
uses: actions/download-artifact@v3
with:
path: .
- name: Upload artifacts to release
uses: svenstaro/upload-release-action@v2
with:
repo_token: ${{ github.token }}
file_glob: true
file: "**/*"
tag: ${{ needs.release.outputs.next }}${{ env.TAG_SUFFIX }}