Skip to content
This repository was archived by the owner on Nov 14, 2025. It is now read-only.

Commit de1e192

Browse files
committed
Improve Unit Tests GH Action
1 parent 9ae9811 commit de1e192

File tree

2 files changed

+25
-2
lines changed

2 files changed

+25
-2
lines changed

.github/workflows/unit-tests.yml

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,14 +75,29 @@ jobs:
7575
with:
7676
path: build
7777
# Use the hash of the Makefile, since the git build version will be in the Makefile
78-
key: ${{ runner.os }}-crc64fast-nvme-${{ hashFiles('**/Makefile') }}
78+
key: ${{ runner.os }}-crc64fast-nvme-${{ hashFiles('build/Makefle') }}
7979
restore-keys: |
8080
${{ runner.os }}-crc64fast-nvme-
8181
82+
- name: Cache built crc32fast-lib shared library
83+
id: crc32fast-lib-cache
84+
uses: actions/cache@v4
85+
with:
86+
path: build
87+
# Use the hash of the Makefile, since the git build version will be in the Makefile
88+
key: ${{ runner.os }}-crc32fast-lib-${{ hashFiles('build/Makefle') }}
89+
restore-keys: |
90+
${{ runner.os }}-crc32fast-lib-
91+
8292
- name: Build crc64fast-nvme shared library
8393
if: steps.crc64fast-nvme-cache.outputs.cache-hit != 'true'
8494
id: build-crc64fast-nvme
85-
run: make build
95+
run: make build-crc64nvme
96+
97+
- name: Build crc32fast-lib shared library
98+
if: steps.crc32fast-lib-cache.outputs.cache-hit != 'true'
99+
id: build-crc32isohdlc
100+
run: make build-crc32isohdlc
86101

87102
- name: Run PHPUnit
88103
id: run-phpunit

Makefile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,14 @@ composer:
5454
build:
5555
@cd build && make
5656

57+
.PHONY: build-crc64nvme
58+
build-crc64nvme:
59+
@cd build && make build-crc64nvme
60+
61+
.PHONY: build-crc32isohdlc
62+
build-crc32isohdlc:
63+
@cd build && make build-crc32isohdlc
64+
5765
.PHONY: clean
5866
clean:
5967
rm -rf vendor

0 commit comments

Comments
 (0)