From 0cd533f9c0331d9ed6fc83ce4840c8471dfade4a Mon Sep 17 00:00:00 2001 From: Sven Thiele Date: Fri, 13 Oct 2023 11:01:56 +0200 Subject: [PATCH] Adjust ci script --- .github/test/linux-env.yml | 12 +++++++++++ .github/test/macos-env.yml | 12 +++++++++++ .github/test/windows-env.yml | 12 +++++++++++ .github/workflows/test-ci.yml | 40 ++++++++++++++++++++++++++++------- 4 files changed, 68 insertions(+), 8 deletions(-) create mode 100644 .github/test/linux-env.yml create mode 100644 .github/test/macos-env.yml create mode 100644 .github/test/windows-env.yml diff --git a/.github/test/linux-env.yml b/.github/test/linux-env.yml new file mode 100644 index 0000000..ec8d488 --- /dev/null +++ b/.github/test/linux-env.yml @@ -0,0 +1,12 @@ +name: clingo +channels: + - conda-forge +dependencies: + - cmake + - ninja + - bison + - re2c + - cxx-compiler + - lua + - cffi + - python diff --git a/.github/test/macos-env.yml b/.github/test/macos-env.yml new file mode 100644 index 0000000..ec8d488 --- /dev/null +++ b/.github/test/macos-env.yml @@ -0,0 +1,12 @@ +name: clingo +channels: + - conda-forge +dependencies: + - cmake + - ninja + - bison + - re2c + - cxx-compiler + - lua + - cffi + - python diff --git a/.github/test/windows-env.yml b/.github/test/windows-env.yml new file mode 100644 index 0000000..a6cbcdd --- /dev/null +++ b/.github/test/windows-env.yml @@ -0,0 +1,12 @@ +name: clingo +channels: + - conda-forge +dependencies: + - cmake + - m2-bison + - re2c + - ninja + - cxx-compiler + - lua + - cffi + - python diff --git a/.github/workflows/test-ci.yml b/.github/workflows/test-ci.yml index 5e79766..5cd6e32 100644 --- a/.github/workflows/test-ci.yml +++ b/.github/workflows/test-ci.yml @@ -3,6 +3,22 @@ name: CI tests on: [push] jobs: + build: + name: clingo ${{ matrix.os }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: ['ubuntu-latest', 'macos-latest', 'windows-latest'] + python-version: ['3.7'] + include: + - os: 'ubuntu-latest' + env_file: '.github/tests/linux-env.yml' + - os: 'macos-latest' + env_file: '.github/tests/macos-env.yml' + - os: 'windows-latest' + env_file: '.github/tests/windows-env.yml' + # linux: # runs-on: "ubuntu-latest" # steps: @@ -71,10 +87,14 @@ jobs: runs-on: "ubuntu-latest" steps: - uses: actions/checkout@v2 - - name: Install bison - run: sudo apt-get install bison - - name: Install re2c - run: sudo apt-get install re2c + with: + activate-environment: clingo + python-version: ${{ matrix.python-version }} + environment-file: ${{ matrix.env_file }} + # - name: Install bison + # run: sudo apt-get install bison + # - name: Install re2c + # run: sudo apt-get install re2c - name: Checkout clingo-sys branch test-clingo-wip run: | git clone https://github.com/potassco/clingo-sys.git ./clingo-sys @@ -119,10 +139,14 @@ jobs: runs-on: "windows-latest" steps: - uses: actions/checkout@v2 - - name: Install bison - run: choco install winflexbison - - name: Install re2c - run: choco install re2c + with: + activate-environment: clingo + python-version: ${{ matrix.python-version }} + environment-file: ${{ matrix.env_file }} + # - name: Install bison + # run: choco install winflexbison + # - name: Install re2c + # run: choco install re2c - name: Checkout clingo-sys branch test-clingo-wip run: | git clone https://github.com/potassco/clingo-sys.git ./clingo-sys