diff --git a/.github/workflows/d.yml b/.github/workflows/prs.yml similarity index 97% rename from .github/workflows/d.yml rename to .github/workflows/prs.yml index b063cf1..c9c2372 100644 --- a/.github/workflows/d.yml +++ b/.github/workflows/prs.yml @@ -5,8 +5,6 @@ name: Unit Tests on: - push: - branches: [ "main" ] pull_request: branches: [ "main" ] diff --git a/.github/workflows/pushes.yml b/.github/workflows/pushes.yml new file mode 100644 index 0000000..1291fc8 --- /dev/null +++ b/.github/workflows/pushes.yml @@ -0,0 +1,42 @@ +# This workflow uses actions that are not certified by GitHub. +# They are provided by a third-party and are governed by +# separate terms of service, privacy policy, and support +# documentation. +name: Unit Tests + +on: + push: + branches: [ "main" ] + +permissions: + contents: read + +jobs: + test: + name: 'Build & Test' + strategy: + matrix: + os: [ubuntu-latest, windows-latest, macOS-latest] + dc: [dmd-latest, ldc-latest] + exclude: + - { os: macOS-latest, dc: dmd-latest } + + runs-on: ${{ matrix.os }} + steps: + - uses: actions/checkout@v4 + + - name: Install compiler + uses: dlang-community/setup-dlang@v1.4.0 + with: + compiler: ${{ matrix.dc }} + + - name: 'Build and test with ${{ matrix.os }} ${{ matrix.dc }}' + run: | + # Build and run tests, as defined by `unittest` configuration + # In this mode, `mainSourceFile` is excluded and `version (unittest)` are included + # See https://dub.pm/package-format-json.html#configurations + dub test + + # Ditto, in release mode. + # Sometimes D packages break in release mode, so this is important to test. + dub test --build=release \ No newline at end of file diff --git a/README.md b/README.md index 8225810..ee88d29 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ NuMem

-[![Unit Test Status](https://github.com/Inochi2D/numem/actions/workflows/d.yml/badge.svg)](https://github.com/Inochi2D/numem/actions/workflows/d.yml) +[![Unit Test Status](https://github.com/Inochi2D/numem/actions/workflows/pushes.yml/badge.svg)](https://github.com/Inochi2D/numem/actions/workflows/pushes.yml) Nu:Mem is a package for D which implements various nogc memory managment tools, allowing classes, strings, and more to be handled safely in nogc mode. This library is still a work in progress, but is intended to be used within Inochi2D's nogc rewrite to allow the library to have good ergonomics,