Skip to content

Commit

Permalink
Split PRs and pushes to seperate workflows.
Browse files Browse the repository at this point in the history
  • Loading branch information
LunaTheFoxgirl committed Apr 9, 2024
1 parent d7c1cd6 commit 21566c7
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 3 deletions.
2 changes: 0 additions & 2 deletions .github/workflows/d.yml → .github/workflows/prs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@
name: Unit Tests

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

Expand Down
42 changes: 42 additions & 0 deletions .github/workflows/pushes.yml
Original file line number Diff line number Diff line change
@@ -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/[email protected]
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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
<img src="numem.png" alt="NuMem" style="width: 50%; max-width: 512px; height: auto;">
</p>

[![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,
Expand Down

0 comments on commit 21566c7

Please sign in to comment.