Merge pull request #56 from ValKmjolnir/develop

📝 adjust CI and build files
This commit is contained in:
ValK 2024-12-11 20:21:03 +08:00 committed by GitHub
commit 96ad435e23
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
7 changed files with 46 additions and 7 deletions

View File

@ -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:

35
.github/workflows/test.yml vendored Normal file
View File

@ -0,0 +1,35 @@
name: Nasal Interpreter Test
on:
push:
branches: [ master, develop ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
mac-aarch64:
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:
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

View File

@ -15,6 +15,10 @@ if(MSVC)
add_compile_options(/utf-8)
endif()
if (APPLE)
add_compile_options(-mmacosx-version-min=10.15)
endif()
# generate release executables
set(CMAKE_BUILD_TYPE "Release")

View File

@ -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)
@ -82,6 +83,7 @@ Download the latest source of the interpreter and build it! It's quite easy to b
Make sure thread model is `posix thread model`, otherwise no thread library exists.
> mkdir build;
> mingw32-make nasal.exe -j4
### __Windows (Visual Studio)__

View File

@ -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)
@ -74,6 +75,7 @@ Windows 平台的预览版解释器现在还没配置相关流水线,
确保 thread model 是 `posix thread model`, 否则没有 thread 库。
> mkdir build;
> mingw32-make nasal.exe -j4
### __Windows 平台 (Vistual Studio)__

View File

@ -295,7 +295,7 @@ clean:
@ rm $(NASAL_OBJECT)
.PHONY: test
test:nasal
test:
@ ./nasal -t -d test/andy_gc_test.nas
@ ./nasal test/argparse_test.nas
@ ./nasal -e test/ascii-art.nas

View File

@ -37,7 +37,7 @@ var s = func() {
}
var ret="";
foreach(var elem;filename)
ret~=io.readfile(elem);
ret~=io.readfile("./src/" ~ elem);
return ret;
}();