Skip to content

Commit

Permalink
remove cross platform testing
Browse files Browse the repository at this point in the history
  • Loading branch information
bpuchala committed Aug 16, 2023
1 parent 2f14f79 commit e2e0009
Show file tree
Hide file tree
Showing 5 changed files with 112 additions and 91 deletions.
30 changes: 19 additions & 11 deletions .github/workflows/test-linux-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Testing build on ubuntu-latest
on: [push, pull_request]

env:
SKBUILD_CONFIGURE_OPTIONS: -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
needs: build-depends
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -21,16 +24,28 @@ jobs:
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
pip install -r test_requirements.txt
echo "SKBUILD_CONFIGURE_OPTIONS=${{ env.SKBUILD_CONFIGURE_OPTIONS }}" >> "$GITHUB_ENV"
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
pip install -r test_requirements.txt
- name: make
shell: bash
run: |
python -m build
- name: install
- name: make install
shell: bash
run: |
pip install dist/*.whl
Expand All @@ -39,10 +54,3 @@ jobs:
shell: bash
run: |
python -m pytest -rsap python/tests
- name: upload libcasm-xtal-ubuntu-latest-x86_64-dist
if: always()
uses: actions/upload-artifact@v3
with:
name: libcasm-xtal-ubuntu-latest-x86_64-dist
path: dist
24 changes: 22 additions & 2 deletions .github/workflows/test-linux-cxx-only.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,13 @@ name: Testing c++ only on ubuntu-latest

on: [push, pull_request]

env:
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
runs-on: ubuntu-latest
timeout-minutes: 60
Expand All @@ -16,14 +22,28 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
- name: configure
shell: bash
run: |
mkdir build_cxx_only
cd build_cxx_only
cmake -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ..
cmake -DCMAKE_BUILD_TYPE=Release ..
- name: make
shell: bash
Expand All @@ -42,7 +62,7 @@ jobs:
run: |
mkdir build_cxx_test
cd build_cxx_test
cmake -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0' -DCMAKE_BUILD_TYPE=Release ../tests
cmake -DCMAKE_BUILD_TYPE=Release ../tests
- name: make tests
shell: bash
Expand Down
53 changes: 53 additions & 0 deletions .github/workflows/test-linux-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Build CASM dependencies on Ubuntu

on:
workflow_call:

jobs:
build-depends:
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
- uses: actions/setup-python@v4
with:
python-version: '3.x'

- name: Set up requirements & configuration variables
run: |
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel build
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: checkout libcasm-global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
uses: actions/checkout@v3
with:
repository: prisms-center/CASMcode_global
path: CASMcode_global
ref: v2.0.3

- name: make global
if: steps.cache-libcasm-global-restore.outputs.cache-hit != 'true'
shell: bash
run: |
cd CASMcode_global
git submodule update --init --recursive
python -m build
pip install dist/*.whl
pip install -r test_requirements.txt
python -m pytest -rsap python/tests
- name: save libcasm-global cache
id: cache-libcasm-global-save
uses: actions/cache/save@v3
with:
path: CASMcode_global/dist
key: ${{ steps.cache-libcasm-global-restore.outputs.cache-primary-key }}
75 changes: 0 additions & 75 deletions .github/workflows/test-linux-source.yml

This file was deleted.

21 changes: 18 additions & 3 deletions .github/workflows/test-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,14 @@ name: Testing on ubuntu-latest
on: [push, pull_request]

env:
SKBUILD_CONFIGURE_OPTIONS: -DCMAKE_CXX_FLAGS='-D_GLIBCXX_USE_CXX11_ABI=0'
SKBUILD_BUILD_OPTIONS: --verbose

jobs:
build-depends:
uses: ./.github/workflows/test-linux-dependencies.yml

build:
needs: build-depends
runs-on: ubuntu-latest
timeout-minutes: 60
steps:
Expand All @@ -21,10 +24,21 @@ jobs:
sudo apt-get update
sudo apt-get install build-essential cmake
pip install --upgrade pip wheel
pip install -r test_requirements.txt
echo "SKBUILD_CONFIGURE_OPTIONS=${{ env.SKBUILD_CONFIGURE_OPTIONS }}" >> "$GITHUB_ENV"
echo "SKBUILD_BUILD_OPTIONS=${{ env.SKBUILD_BUILD_OPTIONS }}" >> "$GITHUB_ENV"
### libcasm-global ###
- name: restore libcasm-global cache
id: cache-libcasm-global-restore
uses: actions/cache/restore@v3
with:
path: CASMcode_global/dist
key: ${{ runner.os }}-libcasm-global-v2-0-3

- name: Install CASM dependencies
run: |
pip install CASMcode_global/dist/*.whl
pip install -r build_requirements.txt
- name: make
shell: bash
run: |
Expand All @@ -33,6 +47,7 @@ jobs:
- name: make test
shell: bash
run: |
pip install -r test_requirements.txt
python -m pytest -rsap python/tests
- name: Set up doc requirements
Expand Down

0 comments on commit e2e0009

Please sign in to comment.