Skip to content

Commit

Permalink
Add support for Win32 (#11)
Browse files Browse the repository at this point in the history
* Fix circleci build
* Add github actions build
* Split CMakeLists.txt into separate subdirectories
* Remove declaration of std::hash, using <functional> header
* Add operator{==,!=} for comparing At<T> with T
* Fix infinite loop in WriteVarIntLoop (cast to u8)
* Use data accessor instead of begin()/end() to get char*
* Some integer cast fixes
* Add text::Write{Nat,Int,Float}, to fix overloading issues
* Use CTest for running each unittest executable
* Only include -lstdc++fs if necessary
* Copy gdtoa library into source tree; modify to compile w/ MSVC
* Fix warning when using -2147483648 literal
* Use gtest_force_shared_crt to prevent CRT mismatch
  • Loading branch information
binji authored Sep 20, 2020
1 parent 83b0607 commit 766c043
Show file tree
Hide file tree
Showing 63 changed files with 6,109 additions and 561 deletions.
13 changes: 2 additions & 11 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,22 +24,16 @@ commands:
parameters:
target:
type: string
outdir:
type: string
steps:
- run: |
make << parameters.target >>
cp << parameters.outdir >>/run_spec_tests .
- run: make << parameters.target >>

test:
description: test the project
parameters:
target:
type: string
steps:
- run: |
make << parameters.target >>
./run_spec_tests third_party/testsuite
- run: make << parameters.target >>

jobs:
build-gcc-debug:
Expand All @@ -51,7 +45,6 @@ jobs:
packages: gcc g++
- compile:
target: gcc-debug
outdir: out/gcc/Debug
- test:
target: test-gcc-debug

Expand All @@ -64,7 +57,6 @@ jobs:
packages: clang
- compile:
target: clang-debug
outdir: out/clang/Debug
- test:
target: test-clang-debug

Expand All @@ -77,7 +69,6 @@ jobs:
packages: clang
- compile:
target: clang-release
outdir: out/clang/Release
- test:
target: test-clang-release

Expand Down
67 changes: 67 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
name: CI

on:
create:
tags:
push:
branches:
- master
pull_request:

jobs:
build:
name: build
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]

steps:

- uses: actions/setup-python@v1
with:
python-version: '3.x'

- uses: actions/checkout@v1
with:
submodules: true

- name: install ninja (ubuntu)
run: sudo apt-get install ninja-build
if: matrix.os == 'ubuntu-latest'

- name: install ninja (macos)
run: brew install ninja
if: matrix.os == 'macos-latest'

- name: mkdir
run: mkdir -p out

- name: cmake (ubuntu)
env:
CC: gcc-9
CXX: g++-9
run: cmake .. -G Ninja
working-directory: out
if: matrix.os == 'ubuntu-latest'

- name: cmake (macos)
run: cmake .. -G Ninja
working-directory: out
if: matrix.os == 'macos-latest'

- name: cmake (windows)
run: cmake ..
working-directory: out
if: matrix.os == 'windows-latest'

- name: build
run: cmake --build out

- name: unittests
run: cmake --build out --target test
if: matrix.os != 'windows-latest'

- name: unittests (windows)
run: cmake --build out --target RUN_TESTS
if: matrix.os == 'windows-latest'
Loading

0 comments on commit 766c043

Please sign in to comment.