diff options
author | Baruch Sterin <baruchs@gmail.com> | 2022-01-22 22:06:11 +0200 |
---|---|---|
committer | Baruch Sterin <baruchs@gmail.com> | 2022-01-22 22:06:11 +0200 |
commit | 5fc7e6aac5b5ae42feac13ea347c47281e350516 (patch) | |
tree | 4d39bfce2172f48bfd882269cdf6ac3c04c17129 /.github/workflows | |
parent | 554a1693ac2bd81169b28227ea718527136f5e7e (diff) | |
download | abc-5fc7e6aac5b5ae42feac13ea347c47281e350516.tar.gz abc-5fc7e6aac5b5ae42feac13ea347c47281e350516.tar.bz2 abc-5fc7e6aac5b5ae42feac13ea347c47281e350516.zip |
Build CMake on GitHub Actions
Diffstat (limited to '.github/workflows')
-rw-r--r-- | .github/workflows/build-posix-cmake.yml (renamed from .github/workflows/build-posix.yml) | 16 | ||||
-rw-r--r-- | .github/workflows/build-windows.yml | 48 |
2 files changed, 8 insertions, 56 deletions
diff --git a/.github/workflows/build-posix.yml b/.github/workflows/build-posix-cmake.yml index aa97aca2..86a4d0f9 100644 --- a/.github/workflows/build-posix.yml +++ b/.github/workflows/build-posix-cmake.yml @@ -11,7 +11,7 @@ jobs: runs-on: ${{ matrix.os }} env: - MAKE_ARGS: ${{ matrix.use_namespace && 'ABC_USE_NAMESPACE=xxx' || '' }} + MAKE_ARGS: ${{ matrix.use_namespace && '-DABC_USE_NAMESPACE=ON' || '' }} DEMO_ARGS: ${{ matrix.use_namespace && '-DABC_NAMESPACE=xxx' || '' }} DEMO_GCC: ${{ matrix.use_namespace && 'g++ -x c++' || 'gcc' }} @@ -32,22 +32,22 @@ jobs: sudo apt install -y libreadline-dev if: ${{ !contains(matrix.os, 'macos') }} - - name: Build Executable + - name: Configure CMake run: | - make -j3 ${MAKE_ARGS} abc + cmake -G Ninja -DCMAKE_BUILD_TYPE=Release -B build - - name: Test Executable + - name: Build CMake run: | - ./abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" + cmake --build build - - name: Build Library + - name: Test Executable run: | - make -j3 ${MAKE_ARGS} libabc.a + ./build/abc -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" - name: Test Library run: | ${DEMO_GCC} ${DEMO_ARGS} -Wall -c src/demo.c -o demo.o - g++ -o demo demo.o libabc.a -lm -ldl -lreadline -lpthread + g++ -o demo demo.o build/libabc.a -lm -ldl -lreadline -lpthread ./demo i10.aig - name: Stage Executable diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml deleted file mode 100644 index 6312780d..00000000 --- a/.github/workflows/build-windows.yml +++ /dev/null @@ -1,48 +0,0 @@ -on: [push] - -jobs: - - build-windows: - - runs-on: windows-latest - - steps: - - - name: Git Checkout - uses: actions/checkout@v2 - with: - submodules: recursive - - - name: Process project files to compile on Github Actions - run: | - sed -i 's#ABC_USE_PTHREADS\"#ABC_DONT_USE_PTHREADS\" /D \"_ALLOW_KEYWORD_MACROS=1\"#g' *.dsp - awk 'BEGIN { del=0; } /# Begin Group "uap"/ { del=1; } /# End Group/ { if( del > 0 ) {del=0; next;} } del==0 {print;} ' abclib.dsp > tmp.dsp - copy tmp.dsp abclib.dsp - del tmp.dsp - unix2dos *.dsp - - - name: Prepare MSVC - uses: bus1/cabuild/action/msdevshell@v1 - with: - architecture: x86 - - - name: Upgrade project files to latest Visual Studio, ignoring upgrade errors, and build - run: | - devenv abcspace.dsw /upgrade ; if (-not $? ) { cat UpgradeLog.htm } - msbuild abcspace.sln /m /nologo /p:Configuration=Release /p:PlatformTarget=x86 - - - name: Test Executable - run: | - _TEST\abc.exe -c "r i10.aig; b; ps; b; rw -l; rw -lz; b; rw -lz; b; ps; cec" - - - name: Stage Executable - run: | - mkdir staging - copy _TEST/abc.exe staging/ - copy UpgradeLog.htm staging/ - - - name: Upload pacakge artifact - uses: actions/upload-artifact@v1 - with: - name: package - path: staging/ |