Skip to content

Commit

Permalink
Created workflow for testing as library.
Browse files Browse the repository at this point in the history
  • Loading branch information
Alvov1 committed Nov 27, 2024
1 parent 74e2146 commit ea9b96f
Show file tree
Hide file tree
Showing 7 changed files with 59 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/benchmarks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: strings
shell: bash
run: |
echo "ci=${{ github.workspace }}/ci" >> "$GITHUB_OUTPUT"
echo "ci=${{ github.workspace }}/ci/benchmarking" >> "$GITHUB_OUTPUT"
echo "benchmark=${{ github.workspace }}/benchmark" >> "$GITHUB_OUTPUT"
echo "build=${{ github.workspace }}/benchmark/cmake-build-release" >> "$GITHUB_OUTPUT"
Expand Down
38 changes: 38 additions & 0 deletions .github/workflows/build_multiple_platforms.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Build as library

on:
push:
branches: [ "main" ]

jobs:
Test:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v4

- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build=${{ github.workspace }}/build" >> "$GITHUB_OUTPUT"
- name: Create directory
run: mkdir ${{ steps.strings.outputs.build }}

- name: Load CMake configuration
working-directory: ${{ steps.strings.outputs.build }}
run: cmake -B ${{ steps.strings.outputs.build }}
-DCMAKE_CXX_COMPILER=g++
-DCMAKE_C_COMPILER=gcc
-DCMAKE_BUILD_TYPE=Release
-S ${{ github.workspace }}

- name: Test
working-directory: ${{ steps.strings.outputs.build }}
run: |
make -j8
./Build
File renamed without changes.
File renamed without changes.
File renamed without changes.
12 changes: 12 additions & 0 deletions ci/build/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
cmake_minimum_required(VERSION 3.26)
set(CMAKE_CXX_STANDARD 20)
project(Build)

include(FetchContent)
FetchContent_Declare(AesiMultiprecision
GIT_REPOSITORY https://github.com/Alvov1/Aesi-Multiprecision.git
GIT_TAG main)
FetchContent_MakeAvailable(AesiMultiprecision)

add_executable(Build main.cpp)
target_include_directories(Build PRIVATE ${AesiMultiprecision_SOURCE_DIR})
8 changes: 8 additions & 0 deletions ci/build/main.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
#include <iostream>
#include <Aeu.h>

int main() {
const Aeu512 number = "0xffff'ffff'ffff'ffff'ffff'ffff'ffff'ffff'ffff'ffff";
std::cout << std::hex << std::showbase << number << std::endl;
return 0;
}

0 comments on commit ea9b96f

Please sign in to comment.