Skip to content

Commit

Permalink
c.i.: Add github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
christophe-lunarg committed Dec 16, 2023
1 parent 586a402 commit 138e2e8
Show file tree
Hide file tree
Showing 4 changed files with 88 additions and 480 deletions.
92 changes: 0 additions & 92 deletions .appveyor.yml

This file was deleted.

49 changes: 49 additions & 0 deletions .github/workflows/actions/build-and-test/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Build and test

inputs:
build_dir:
description: "The build dir to use"
required: true
std:
description: "The C++ standard to use"
required: true
build_type:
description: "The build type to use"
default: Debug
sse3:
description: "Whether to enable sse3"
default: OFF
avx:
description: "Whether to enable avx"
default: OFF
pure:
description: "Whether to enable pure"
default: OFF
lang_extensions:
description: "Whether to enable lang extensions"
default: OFF

runs:
using: "composite"
steps:
- name: Build GLM
shell: bash
run: |
mkdir -p ${{ inputs.build_dir }}
cmake -DCMAKE_INSTALL_PREFIX=$RUNNER_TEMP/install \
-DCMAKE_BUILD_TYPE=${{ inputs.build_type }} \
-DGLM_TEST_ENABLE=ON \
-DGLM_TEST_ENABLE_CXX_${{ inputs.std}}=ON \
-DGLM_TEST_ENABLE_SIMD_SSE3=${{ inputs.sse3 }} \
-DGLM_TEST_ENABLE_SIMD_AVX=${{ inputs.avx }} \
-DGLM_TEST_FORCE_PURE=${{ inputs.pure }} \
-DGLM_TEST_ENABLE_LANG_EXTENSIONS=${{ inputs.lang_extensions }} \
-S . \
-B ${{ inputs.build_dir }}
cmake --build ${{ inputs.build_dir }} --parallel 2
- name: Run tests
shell: bash
run:
ctest --test-dir ${{ inputs.build_dir }} --output-on-failure --parallel 4
39 changes: 39 additions & 0 deletions .github/workflows/github-actions-demo.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: GLM Unit Tests

run-name: ${{ github.actor }} is running GLM unit tests
on: [push]

jobs:
Explore-GitHub-Actions:
name: "${{ matrix.os}} ${{ matrix.cxx }} C++:${{ matrix.std }}"
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
std: [98, 11, 14, 17, 20]
os: [ubuntu-latest, macos-latest, windows-latest]
config: [Debug, Release]

# env:
# CXX: ${{ matrix.cxx }}

steps:
- run: echo "πŸŽ‰ The job was automatically triggered by a ${{ github.event_name }} event."
- run: echo "🐧 This job is now running on a ${{ runner.os }} server hosted by GitHub!"
- run: echo "πŸ”Ž The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
- name: Check out repository code
uses: actions/checkout@v4
- run: echo "πŸ’‘ The ${{ github.repository }} repository has been cloned to the runner."
- run: echo "πŸ–₯️ The workflow is now ready to test your code on the runner."
- name: List files in the repository
run: |
ls ${{ github.workspace }}
- run: echo "🍏 This job's status is ${{ job.status }}."

- name: Tool versions
run: |
# ${CXX} --version
cmake --version

- run: cmake --build . --parallel --config ${{matrix.config}}
- run: ctest --parallel 4 --verbose -C ${{matrix.config}}
Loading

0 comments on commit 138e2e8

Please sign in to comment.