Skip to content

Commit

Permalink
Migrate to Github Actions
Browse files Browse the repository at this point in the history
  • Loading branch information
dancazarin committed Jan 26, 2024
1 parent f28c4e8 commit 2a55f98
Show file tree
Hide file tree
Showing 3 changed files with 243 additions and 329 deletions.
83 changes: 83 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,83 @@
name: Build
on: push
jobs:
binaries-linux-x86_64:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build
wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s - 17
cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER=clang++-17
cmake -B build-debug -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER=clang++-17
ninja -C build-release install
ninja -C build-debug install
- name: Binaries
uses: actions/upload-artifact@v4
with:
name: linux-x86_64
path: ${{ github.workspace }}/dist

binaries-windows-x86:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
choco install llvm --version 17.0.6 --no-progress -y
choco install ninja --no-progress -y
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set CXXFLAGS=-m32
cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
cmake -B build-debug -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
ninja -C build-release install
ninja -C build-debug install
- name: Binaries
uses: actions/upload-artifact@v4
with:
name: windows-x86
path: ${{ github.workspace }}/dist

binaries-windows-x86_64:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
shell: cmd
run: |
choco install llvm --version 17.0.6 --no-progress -y
choco install ninja --no-progress -y
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
cmake -B build-debug -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DKFR_ENABLE_CAPI_BUILD=ON -DKFR_ARCH=sse2 -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
ninja -C build-release install
ninja -C build-debug install
- name: Binaries
uses: actions/upload-artifact@v4
with:
name: windows-x86_64
path: ${{ github.workspace }}/dist

binaries-macos-x86_64:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Build
run: |
brew install ninja
cmake -B build-release -S . -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH=sse41
cmake -B build-debug -S . -DCMAKE_BUILD_TYPE=Debug -DCMAKE_INSTALL_PREFIX=${{ github.workspace }}/dist -GNinja -DCMAKE_OSX_ARCHITECTURES=x86_64 -DCMAKE_OSX_DEPLOYMENT_TARGET=10.13 -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH=sse41
ninja -C build-release install
ninja -C build-debug install
- name: Binaries
uses: actions/upload-artifact@v4
with:
name: macos-x86_64
path: ${{ github.workspace }}/dist
165 changes: 160 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,174 @@
name: Tests
name: Test
on: push
jobs:
ubuntu22-gcc11:
ubuntu22-clang17-x86_64:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: ci/run.sh build-release -DKFR_ARCH=target -DCMAKE_CXX_COMPILER=g++ -DCMAKE_BUILD_TYPE=Release
env:
SDE_LINUX: ${{ secrets.SDE_LINUX }}
TMP_DIR: ${{ runner.temp }}
run: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build
wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s - 17
curl -o "$TMP_DIR/sde.tar.bz2" -L "$SDE_LINUX"
mkdir "$TMP_DIR/sde-bin"
tar -C "$TMP_DIR/sde-bin" -xjf "$TMP_DIR/sde.tar.bz2" --strip 1
sudo ln -s $TMP_DIR/sde-bin/sde64 /usr/bin/sde
ci/run.sh build-release -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH_TESTS=sse2,sse3,sse41,avx,avx2,avx512 -DKFR_ARCH=avx2 -DKFR_USE_SDE=ON -DCMAKE_CXX_COMPILER=clang++-17 -DCMAKE_BUILD_TYPE=Release
ubuntu22-clang14:
ubuntu22-clang17-arm:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: ci/run.sh build-release -DKFR_ARCH=target -DCMAKE_CXX_COMPILER=clang++ -DCMAKE_BUILD_TYPE=Release
run: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build g++-arm-linux-gnueabihf qemu qemu-system-arm qemu-user
wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s - 17
ci/run.sh build-release -DENABLE_EXAMPLES=OFF -DCLANG_SUFFIX=-17 -DCMAKE_BUILD_TYPE=Release -DGCC_VER=11 -DCMAKE_TOOLCHAIN_FILE=../cmake/arm.cmake
ubuntu22-clang17-arm64:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: |
set -e
sudo apt-get update && sudo apt-get install -y ninja-build g++-aarch64-linux-gnu qemu qemu-system-arm qemu-user
wget -O - https://apt.llvm.org/llvm.sh | sudo bash -s - 17
ci/run.sh build-release -DENABLE_EXAMPLES=OFF -DCLANG_SUFFIX=-17 -DCMAKE_BUILD_TYPE=Release -DGCC_VER=11 -DCMAKE_TOOLCHAIN_FILE=../cmake/aarch64.cmake
ubuntu22-gcc13-x86_64:
runs-on: ubuntu-22.04
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: |
sudo apt-get update && sudo apt-get install -y ninja-build g++-13
ci/run.sh build-release -DKFR_ARCH=target -DCMAKE_CXX_COMPILER=g++-13 -DCMAKE_BUILD_TYPE=Release
windows2022-clang17-x86:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
env:
SDE_WINDOWS: ${{ secrets.SDE_WINDOWS }}
TMP_DIR: ${{ runner.temp }}
shell: cmd
run: |
choco install llvm --version 17.0.6 --no-progress -y
choco install ninja --no-progress -y
curl -o "%TMP_DIR%/sde.zip" -L %SDE_WINDOWS%
"C:\Program Files\7-Zip\7z.exe" x -oC:\sde "%TMP_DIR%/sde.zip"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set CXXFLAGS=-m32
set PATH=C:\sde;%PATH%
ci\run.cmd build-release -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH_TESTS=sse2,ssse3,sse42,avx,avx2,avx512 -DKFR_ENABLE_MULTIARCH=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DKFR_USE_SDE=ON -DKFR_ARCH=sse2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
windows2022-clang17-x86_64:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
env:
SDE_WINDOWS: ${{ secrets.SDE_WINDOWS }}
TMP_DIR: ${{ runner.temp }}
shell: cmd
run: |
choco install llvm --version 17.0.6 --no-progress -y
choco install ninja --no-progress -y
curl -o "%TMP_DIR%/sde.zip" -L %SDE_WINDOWS%
"C:\Program Files\7-Zip\7z.exe" x -oC:\sde "%TMP_DIR%/sde.zip"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\sde;%PATH%
ci\run.cmd build-release -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH_TESTS=sse2,ssse3,sse42,avx,avx2,avx512 -DKFR_ENABLE_MULTIARCH=ON -DCMAKE_CXX_COMPILER="C:/Program Files/LLVM/bin/clang-cl.exe" -DCMAKE_LINKER="C:/Program Files/LLVM/bin/lld-link.exe" -DKFR_USE_SDE=ON -DKFR_ARCH=sse2 -DCMAKE_BUILD_TYPE=Release -DCMAKE_AR="C:/Program Files/LLVM/bin/llvm-lib.exe"
windows2022-msvc2022-x86:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
env:
SDE_WINDOWS: ${{ secrets.SDE_WINDOWS }}
TMP_DIR: ${{ runner.temp }}
shell: cmd
run: |
choco install ninja --no-progress -y
curl -o "%TMP_DIR%/sde.zip" -L %SDE_WINDOWS%
"C:\Program Files\7-Zip\7z.exe" x -oC:\sde "%TMP_DIR%/sde.zip"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars32.bat"
set PATH=C:\sde;%PATH%
ci\run.cmd build-release -DKFR_ARCH_TESTS=sse2,ssse3,sse42,avx,avx2,avx512 -DKFR_ENABLE_MULTIARCH=ON -DKFR_USE_SDE=ON -DKFR_ARCH=sse2 -DCMAKE_BUILD_TYPE=Release
windows2022-msvc2022-x86_64:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
env:
SDE_WINDOWS: ${{ secrets.SDE_WINDOWS }}
TMP_DIR: ${{ runner.temp }}
shell: cmd
run: |
choco install ninja --no-progress -y
curl -o "%TMP_DIR%/sde.zip" -L %SDE_WINDOWS%
"C:\Program Files\7-Zip\7z.exe" x -oC:\sde "%TMP_DIR%/sde.zip"
call "C:\Program Files\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
set PATH=C:\sde;%PATH%
ci\run.cmd build-release -DKFR_ARCH_TESTS=sse2,ssse3,sse42,avx,avx2,avx512 -DKFR_ENABLE_MULTIARCH=ON -DKFR_USE_SDE=ON -DKFR_ARCH=sse2 -DCMAKE_BUILD_TYPE=Release
windows2022-clang-android-arm:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
shell: cmd
run: |
choco install ninja --no-progress -y
ci\run.cmd build-release -DCMAKE_MAKE_PROGRAM=C:\ProgramData\chocolatey\lib\ninja\tools\ninja.exe -DCMAKE_TOOLCHAIN_FILE="%ANDROID_NDK%\build\cmake\android.toolchain.cmake" -DANDROID_ABI=armeabi-v7a -DANDROID_ARM_NEON=TRUE -DKFR_SKIP_TESTS=ON -DCMAKE_BUILD_TYPE=Release
windows2022-clang-android-arm64:
runs-on: windows-2022
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
shell: cmd
run: |
choco install ninja --no-progress -y
ci\run.cmd build-release -DCMAKE_TOOLCHAIN_FILE="%ANDROID_NDK%\build\cmake\android.toolchain.cmake" -DANDROID_ABI=arm64-v8a -DANDROID_ARM_NEON=TRUE -DKFR_SKIP_TESTS=ON -DCMAKE_BUILD_TYPE=Release
macos13-xcode14-x86_64:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: |
set -e
brew install ninja
ci/run.sh build-release -DCMAKE_OSX_ARCHITECTURES=x86_64 -DKFR_ENABLE_CAPI_BUILD=ON -DCMAKE_POSITION_INDEPENDENT_CODE=ON -DKFR_ARCH_TESTS=sse42,avx -DKFR_ARCH=target -DCMAKE_BUILD_TYPE=Release
macos13-xcode14-ios-arm64:
runs-on: macos-13
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Tests
run: |
set -e
brew install ninja
ci/run.sh build-release -DCMAKE_TOOLCHAIN_FILE=../cmake/ios.cmake -DIOS_DEPLOYMENT_TARGET=11.0 -DCMAKE_BUILD_TYPE=Release -DIOS_PLATFORM=OS64 -DIOS_ARCH=arm64 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DKFR_SKIP_TESTS=ON
Loading

0 comments on commit 2a55f98

Please sign in to comment.