Skip to content

Allow use to import declarations into the current namespace, like in Rust #72

Allow use to import declarations into the current namespace, like in Rust

Allow use to import declarations into the current namespace, like in Rust #72

name: build-and-test
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-and-test:
name: Build and test on ${{matrix.os}} in ${{matrix.build-type}} mode
runs-on: ${{matrix.os}}
strategy:
matrix:
build-type: [Debug, Release]
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v2
with:
repository: AnyDSL/artic
path: artic
- uses: actions/checkout@v2
with:
repository: AnyDSL/thorin
path: thorin
- uses: actions/checkout@v2
with:
repository: AnyDSL/half
path: half
- name: Configure Thorin
run: >
cmake
-S ${{github.workspace}}/thorin
-B ${{github.workspace}}/thorin/build
-DHalf_DIR=${{github.workspace}}/half
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DCMAKE_DISABLE_FIND_PACKAGE_LLVM=ON
- name: Build Thorin
run: cmake --build ${{github.workspace}}/thorin/build --config ${{matrix.build-type}}
- name: Configure Artic
run: >
cmake
-S ${{github.workspace}}/artic
-B ${{github.workspace}}/artic/build
-DThorin_DIR=${{github.workspace}}/thorin/build/share/anydsl/cmake
-DCMAKE_BUILD_TYPE=${{matrix.build-type}}
-DBUILD_TESTING=ON
- name: Build Artic
run: cmake --build ${{github.workspace}}/artic/build --config ${{matrix.build-type}}
# Copy the Thorin DLL for Windows (when it exists)
- name: Copy Thorin DLL (Windows only)
if: startsWith(matrix.os, 'windows')
continue-on-error: true
run: >
cmake -E copy
"${{github.workspace}}/thorin/build/bin/${{matrix.build-type}}/thorin.dll"
"${{github.workspace}}/artic/build/bin/${{matrix.build-type}}/thorin.dll"
- name: Test Artic
working-directory: ${{github.workspace}}/artic/build
run: ctest -C ${{matrix.build-type}} --output-on-failure