From c9c6b905eab04ba38a88c54d489465ba6d812c66 Mon Sep 17 00:00:00 2001 From: ValKmjolnir Date: Wed, 11 Dec 2024 20:13:49 +0800 Subject: [PATCH] :memo: adjust CI --- .github/workflows/c-cpp.yml | 6 +----- .github/workflows/test.yml | 35 +++++++++++++++++++++++++++++++++++ README.md | 1 + doc/README_zh.md | 1 + test/hexdump.nas | 2 +- 5 files changed, 39 insertions(+), 6 deletions(-) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/c-cpp.yml b/.github/workflows/c-cpp.yml index b0375ad..c7fc759 100644 --- a/.github/workflows/c-cpp.yml +++ b/.github/workflows/c-cpp.yml @@ -1,12 +1,8 @@ -name: Build/Test/Package CI +name: Nightly Build on: schedule: - cron: "0 16 * * *" - push: - branches: [ master, develop ] - pull_request: - branches: [ master ] workflow_dispatch: jobs: diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..2fe1712 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Nightly Build + +on: + push: + branches: [ master, develop ] + pull_request: + branches: [ master ] + workflow_dispatch: + +jobs: + mac-aarch64-build: + runs-on: macos-latest + steps: + - uses: actions/checkout@v4 + - name: Build + run: | + make -j4 + cd module + make all -j4 + cd .. + - name: Test + run: make test + + linux-x86_64-build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - name: Build + run: | + make -j4 + cd module + make all -j4 + cd .. + - name: Test + run: make test diff --git a/README.md b/README.md index 027b5ed..119dbf4 100644 --- a/README.md +++ b/README.md @@ -6,6 +6,7 @@ [![license](https://img.shields.io/badge/license-GPLv2-green?style=flat-square&logo=github)](./LICENSE) ![downloads](https://img.shields.io/github/downloads/ValKmjolnir/Nasal-Interpreter/total.svg?style=flat-square&logo=github) [![C/C++ CI](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/c-cpp.yml) +[![Test CI](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/test.yml/badge.svg)](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/test.yml) > This document is also available in: [__中文__](./doc/README_zh.md) | [__English__](./README.md) diff --git a/doc/README_zh.md b/doc/README_zh.md index 9a64b6b..b750837 100644 --- a/doc/README_zh.md +++ b/doc/README_zh.md @@ -6,6 +6,7 @@ [![license](https://img.shields.io/badge/license-GPLv2-green?style=flat-square&logo=github)](../LICENSE) ![downloads](https://img.shields.io/github/downloads/ValKmjolnir/Nasal-Interpreter/total.svg?style=flat-square&logo=github) [![C/C++ CI](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/c-cpp.yml/badge.svg)](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/c-cpp.yml) +[![Test CI](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/test.yml/badge.svg)](https://github.com/ValKmjolnir/Nasal-Interpreter/actions/workflows/test.yml) > 这篇文档包含多语言版本: [__中文__](../doc/README_zh.md) | [__English__](../README.md) diff --git a/test/hexdump.nas b/test/hexdump.nas index cf5c66b..b6e96b6 100644 --- a/test/hexdump.nas +++ b/test/hexdump.nas @@ -37,7 +37,7 @@ var s = func() { } var ret=""; foreach(var elem;filename) - ret~=io.readfile(elem); + ret~=io.readfile("./src/" ~ elem); return ret; }();