Build koana #1
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build koana | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - '.github/workflows/koana.yml' | |
| jobs: | |
| build-windows-x64: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Setup VS build tools | |
| uses: seanmiddleditch/gha-setup-vsdevenv@v5 | |
| with: | |
| host_arch: amd64 | |
| arch: amd64 | |
| - name: Install nasm | |
| shell: pwsh | |
| run: | | |
| choco install nasm | |
| - name: Build openssl | |
| shell: pwsh | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| $env:PATH += ";C:\Program Files\NASM" | |
| C:\Strawberry\perl\bin\perl.exe Configure VC-WIN64A | |
| C:\Strawberry\perl\bin\perl.exe Configure no-makedepend | |
| nmake | |
| - name: Build koana | |
| shell: pwsh | |
| run: | | |
| cmake -B build -A x64 -DOPENSSL_ROOT_DIR=".\openssl\" -DOPENSSL_CRYPTO_LIBRARY=".\openssl\libcrypto.lib" -DOPENSSL_SSL_LIBRARY=".\openssl\libssl.lib" -DOPENSSL_INCLUDE_DIR=".\openssl\include\" | |
| cmake --build build --config Release --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-windows-x64 | |
| path: build/Release/koana.dll | |
| build-windows-arm64: | |
| runs-on: windows-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Setup VS build tools | |
| uses: seanmiddleditch/gha-setup-vsdevenv@v5 | |
| with: | |
| host_arch: amd64 | |
| arch: arm64 | |
| - name: Install nasm | |
| shell: pwsh | |
| run: | | |
| choco install nasm | |
| - name: Build openssl | |
| shell: pwsh | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| $env:PATH += ";C:\Program Files\NASM" | |
| C:\Strawberry\perl\bin\perl.exe Configure VC-WIN64-ARM | |
| C:\Strawberry\perl\bin\perl.exe Configure no-makedepend | |
| nmake | |
| - name: Build koana | |
| shell: pwsh | |
| run: | | |
| cmake -B build -A ARM64 -DOPENSSL_ROOT_DIR=".\openssl\" -DOPENSSL_CRYPTO_LIBRARY=".\openssl\libcrypto.lib" -DOPENSSL_SSL_LIBRARY=".\openssl\libssl.lib" -DOPENSSL_INCLUDE_DIR=".\openssl\include\" | |
| cmake --build build --config Release --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-windows-arm64 | |
| path: build/Release/koana.dll | |
| build-linux-x64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Install build tools | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt install cmake | |
| - name: Build openssl | |
| shell: bash | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| ./Configure linux-x86_64 | |
| make -j4 | |
| - name: Build koana | |
| shell: bash | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="./openssl/" -DOPENSSL_CRYPTO_LIBRARY="./openssl/libcrypto.a" -DOPENSSL_SSL_LIBRARY="./openssl/libssl.a" -DOPENSSL_INCLUDE_DIR="./openssl/include/" | |
| cmake --build build --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-linux-x64 | |
| path: build/libkoana.so | |
| build-linux-arm64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Install build tools | |
| shell: bash | |
| run: | | |
| sudo apt update | |
| sudo apt install cmake gcc-aarch64-linux-gnu g++-aarch64-linux-gnu libssl-dev | |
| - name: Build openssl | |
| shell: bash | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| export CC=aarch64-linux-gnu-gcc | |
| export CXX=aarch64-linux-gnu-g++ | |
| export AR=aarch64-linux-gnu-ar | |
| ./Configure linux-aarch64 | |
| make -j4 | |
| - name: Build koana | |
| shell: bash | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=aarch64-linux-gnu-gcc -DCMAKE_CXX_COMPILER=aarch64-linux-gnu-g++ -DOPENSSL_ROOT_DIR="./openssl/" -DOPENSSL_CRYPTO_LIBRARY="./openssl/libcrypto.a" -DOPENSSL_SSL_LIBRARY="./openssl/libssl.a" -DOPENSSL_INCLUDE_DIR="./openssl/include/" | |
| cmake --build build --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-linux-arm64 | |
| path: build/libkoana.so | |
| build-macos-x64: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Install nasm | |
| shell: bash | |
| run: | | |
| brew install nasm | |
| - name: Build openssl | |
| shell: bash | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| ./Configure darwin64-x86_64-cc | |
| make -j4 | |
| - name: Build koana | |
| shell: pwsh | |
| run: | | |
| cmake -B build -DOPENSSL_ROOT_DIR=".\openssl\" -DOPENSSL_CRYPTO_LIBRARY=".\openssl\libcrypto.a" -DOPENSSL_SSL_LIBRARY=".\openssl\libssl.a" -DOPENSSL_INCLUDE_DIR=".\openssl\include\" -DCMAKE_OSX_ARCHITECTURES=x86_64 | |
| cmake --build build --config Release --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-macos-x64 | |
| path: build/libkoana.dylib | |
| build-macos-arm64: | |
| runs-on: macos-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Install nasm | |
| shell: bash | |
| run: | | |
| brew install nasm | |
| - name: Build openssl | |
| shell: bash | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| ./Configure darwin64-arm64-cc | |
| make -j4 | |
| - name: Build koana | |
| shell: pwsh | |
| run: | | |
| cmake -B build -DOPENSSL_ROOT_DIR=".\openssl\" -DOPENSSL_CRYPTO_LIBRARY=".\openssl\libcrypto.a" -DOPENSSL_SSL_LIBRARY=".\openssl\libssl.a" -DOPENSSL_INCLUDE_DIR=".\openssl\include\" -DCMAKE_OSX_ARCHITECTURES=arm64 | |
| cmake --build build --config Release --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-macos-arm64 | |
| path: build/libkoana.dylib | |
| build-musl-x64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Setup Alpine Linux | |
| uses: jirutka/setup-alpine@v1 | |
| with: | |
| packages: > | |
| build-base | |
| cmake | |
| git | |
| make | |
| gcc | |
| g++ | |
| nasm | |
| perl | |
| linux-headers | |
| - name: Build openssl | |
| shell: alpine.sh {0} | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| ./Configure linux-x86_64 | |
| make -j4 | |
| - name: Build koana | |
| shell: bash | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="./openssl/" -DOPENSSL_CRYPTO_LIBRARY="./openssl/libcrypto.a" -DOPENSSL_SSL_LIBRARY="./openssl/libssl.a" -DOPENSSL_INCLUDE_DIR="./openssl/include/" | |
| cmake --build build --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-musl-x64 | |
| path: build/libkoana.so | |
| build-musl-arm64: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Clone koana repo | |
| uses: actions/checkout@v4 | |
| with: | |
| repository: DSharpPlus/libkoana | |
| - name: Setup Alpine Linux | |
| uses: jirutka/setup-alpine@v1 | |
| with: | |
| arch: aarch64 | |
| packages: > | |
| build-base | |
| cmake | |
| git | |
| make | |
| gcc | |
| g++ | |
| nasm | |
| perl | |
| linux-headers | |
| - name: Build openssl | |
| shell: alpine.sh {0} | |
| run: | | |
| git clone https://github.com/openssl/openssl | |
| cd openssl | |
| git checkout openssl-3.5.0 | |
| ./Configure linux-aarch64 | |
| make -j4 | |
| - name: Build koana | |
| shell: bash | |
| run: | | |
| cmake -B build -DCMAKE_BUILD_TYPE=Release -DOPENSSL_ROOT_DIR="./openssl/" -DOPENSSL_CRYPTO_LIBRARY="./openssl/libcrypto.a" -DOPENSSL_SSL_LIBRARY="./openssl/libssl.a" -DOPENSSL_INCLUDE_DIR="./openssl/include/" | |
| cmake --build build --parallel | |
| - name: Publish Artifacts | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: koana-musl-arm64 | |
| path: build/libkoana.so | |
| # publish-nuget: | |
| # runs-on: ubuntu-latest | |
| # needs: [build-windows-x64, build-windows-arm64, build-linux-x64, build-linux-arm64, build-macos-x64, build-macos-arm64, build-musl-x64, build-musl-arm64] | |
| # steps: |