Skip to content
34 changes: 26 additions & 8 deletions .github/workflows/c-cpp.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ jobs:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
# as of 21st Sep 2021, ubuntu-16.04 is no longer supported by github actions: https://github.blog/changelog/2021-04-29-github-actions-ubuntu-16-04-lts-virtual-environment-will-be-removed-on-september-20-2021/
# 18.04 burnout: https://github.com/actions/runner-images/issues/6002
os: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04]
os: [ubuntu-22.04, ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- name: Update apt
Expand Down Expand Up @@ -71,39 +71,57 @@ jobs:
strategy:
matrix:
# https://docs.github.com/en/actions/using-github-hosted-runners/about-github-hosted-runners
os: [macos-13]
os: [macos-14]
runs-on: ${{ matrix.os }}
steps:
- name: Install dependencies
run: brew install bison@3.8 cmake boost gsl gnu-sed libomp gmp cabal-install ghc
- name: pioritize bison3.8
run: brew install bison cmake boost gsl gnu-sed libomp gmp cabal-install ghc
- name: pioritize homebrew bison
# macos-13 has also installed a quite old bison2.3 version and it is found first according
# to default PATH settings. Thus, configure.ac will test the wrong version and NOT set
# BISONNEW as a compiler flag (see configure.ac)
run: echo "PATH=/usr/local/opt/bison@3.8/bin:$PATH" >> $GITHUB_ENV
run: echo "PATH=/opt/homebrew/opt/bison/bin:$PATH" >> $GITHUB_ENV
- name: update cabal
run: cabal update
- name: add random Haskell lib
run: cabal install --lib random
#- name: add base Haskell lib containers (prelude, Data.Map, Data.Map.Strict)
# run: cabal install --lib base
- name: Checkout truth
run: git clone --branch master https://github.com/jlab/gapc-test-suite.git $GITHUB_WORKSPACE/../gapc-test-suite
run: git clone --branch migrate_osx14 https://github.com/jlab/gapc-test-suite.git $GITHUB_WORKSPACE/../gapc-test-suite

- uses: actions/checkout@v3
- name: configure
run: ./configure --prefix $GITHUB_WORKSPACE
run: ./configure --prefix $GITHUB_WORKSPACE --with-boost=/opt/homebrew/Cellar/boost/1.90.0_1/
- name: patch configuration for OSX
run: gsed -E "s|^YACC = .+$|YACC = /usr/local/opt/bison@3.8/bin/bison|" -i config.mf && gsed -E "s|^SED = .+$|SED = /usr/local/opt/gnu-sed/libexec/gnubin/sed|" -i config.mf && gsed -E "s/ -D_XOPEN_SOURCE=500 / /" -i config.mf && gsed -E "s/ -std=c\+\+17 / -std=c\+\+11 /" -i config.mf
run: |
gsed -E "s|^YACC = .+$|YACC = /opt/homebrew/opt/bison/bin/bison|" -i config.mf
gsed -E "s|^SED = .+$|SED = /opt/homebrew/opt/gnu-sed/libexec/gnubin/sed|" -i config.mf
gsed -E "s/ -D_XOPEN_SOURCE=500 / /" -i config.mf
gsed -E "s/ -std=c\+\+17 / -std=c\+\+11 /" -i config.mf
- name: make
run: make -j 3
- name: make install
run: sudo make install

- name: test-mod
run: make test-mod TRUTH_DIR=$GITHUB_WORKSPACE/../gapc-test-suite/Truth TRUTH_SUFFIX=_osx
- name: Export test-mod results
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-mod_results
path: ./testdata/modtest/temp

- name: test-mod_outside
run: make -j 2 test-mod_outside TRUTH_DIR=$GITHUB_WORKSPACE/../gapc-test-suite/Truth TRUTH_SUFFIX=_osx
- name: Export test-mod_outside results
if: failure()
uses: actions/upload-artifact@v7
with:
name: test-mod_outside_results
path: ./testdata/modtest/temp

- name: test-regress
run: make test-regress TRUTH_DIR=$GITHUB_WORKSPACE/../gapc-test-suite/Truth
- name: test-ambiguity
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
| |_) | __/ | | | | | | | (_| | | | | \__ \ | |__| |/ ____ \| |
|____/ \___|_|_|_| |_| |_|\__,_|_| |_| |___/ \_____/_/ \_\_|
```

## Dependencies

Bellman's GAP was tested on the following dependencies.
Expand Down
3 changes: 1 addition & 2 deletions rtlib/adp.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@
#define RTLIB_ADP_HH_

#include <algorithm>
// needed for uint64_t (Integer ...)
#include <boost/cstdint.hpp>
#include <cstdint>

#include "empty.hh"
#include "algebra.hh"
Expand Down
2 changes: 1 addition & 1 deletion rtlib/bigint.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ typedef mpz_class BigInt;

#else

#include <boost/cstdint.hpp>
#include <cstdint>

typedef uint64_t BigInt;

Expand Down
2 changes: 1 addition & 1 deletion rtlib/bitops.hh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

#include <cassert>

#include <boost/cstdint.hpp>
#include <cstdint>

template <typename T>
int
Expand Down
2 changes: 1 addition & 1 deletion rtlib/hashtng.hh
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
#include <vector>
#include <algorithm>
#include <utility>
#include <boost/cstdint.hpp>
#include <cstdint>


#include "bitops.hh"
Expand Down
3 changes: 1 addition & 2 deletions rtlib/list.hh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@
#include <utility>
// #include <set>

// tr1 has it
#include <boost/cstdint.hpp>
#include <cstdint>


#include "empty.hh"
Expand Down
3 changes: 1 addition & 2 deletions rtlib/multipool.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@

#include <vector>

// tr1 has it
#include <boost/cstdint.hpp>
#include <cstdint>

#include "map_pool.hh"

Expand Down
3 changes: 1 addition & 2 deletions rtlib/pool.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,7 @@
#include <cassert>
#include <cstdlib>

// tr1 has it
#include <boost/cstdint.hpp>
#include <cstdint>

#include "map_pool.hh"

Expand Down
2 changes: 1 addition & 1 deletion rtlib/rope.hh
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@
#include <sstream>

#include <string>
#include <boost/cstdint.hpp>
#include <cstdint>
#include <boost/algorithm/string/replace.hpp>

#include "../rtlib/cstr.h"
Expand Down
2 changes: 1 addition & 1 deletion rtlib/shape.hh
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@
#include <algorithm>
#include <utility>

#include <boost/cstdint.hpp>
#include <cstdint>

#include "shape_alph.hh"
#include "bitops.hh"
Expand Down
3 changes: 0 additions & 3 deletions rtlib/string.hh
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,6 @@
#include <vector>
#include <cstdint>

// tr1 has it
#include <boost/cstdint.hpp>

// FIXME profile this
#include "pool.hh"

Expand Down
5 changes: 1 addition & 4 deletions src/runtime.hh
Original file line number Diff line number Diff line change
Expand Up @@ -28,14 +28,11 @@
#include <iostream>
#include <vector>
#include <cassert>
#include <cstdint>

#include "yieldsize.hh"
#include "table.hh"

// tr1 has it
#include <boost/cstdint.hpp>


#ifndef UINT32_MAX
#define UINT32_MAX 4294967295U
#endif
Expand Down
3 changes: 1 addition & 2 deletions src/yieldsize.hh
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@
#include <vector>
#include <list>

// tr1 has it
#include <boost/cstdint.hpp>
#include <cstdint>

class Filter;

Expand Down
2 changes: 1 addition & 1 deletion testdata/sandbox/accu.cc
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@

#include <boost/cstdint.hpp>
#include <cstdint>

#include <boost/accumulators/accumulators.hpp>
#include <boost/accumulators/statistics/stats.hpp>
Expand Down
2 changes: 1 addition & 1 deletion testdata/sandbox/limits.cc
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@

#include <cassert>
#include <boost/cstdint.hpp>
#include <cstdint>
#define UINT32_MAX 4294967295U

int main(int argc, char **argv)
Expand Down
Loading