mirror of
https://github.com/CPunch/Cosmo.git
synced 2025-05-06 09:50:07 +00:00
Compare commits
No commits in common. "38d9c499ead364abcef8cfc050ec2a9f243e0ead" and "420cd3e856c1890c845f15368584ef4685828c9c" have entirely different histories.
38d9c499ea
...
420cd3e856
44
.github/workflows/check_build.yaml
vendored
44
.github/workflows/check_build.yaml
vendored
@ -1,44 +0,0 @@
|
|||||||
name: Check Builds
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
paths:
|
|
||||||
- src/**
|
|
||||||
- main.c
|
|
||||||
- Makefile
|
|
||||||
- CMakeLists.txt
|
|
||||||
- .github/workflows/check_build.yaml
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
ubuntu-build:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: CMake
|
|
||||||
run: cmake -B build
|
|
||||||
- name: Build
|
|
||||||
run: cmake --build build
|
|
||||||
- name: Upload build artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Cosmo-Ubuntu
|
|
||||||
path: bin
|
|
||||||
|
|
||||||
windows-build:
|
|
||||||
runs-on: windows-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
with:
|
|
||||||
submodules: recursive
|
|
||||||
- name: Create CMake build files
|
|
||||||
run: cmake -B build -DCMAKE_BUILD_TYPE=MinSizeRel
|
|
||||||
- name: Check compilation
|
|
||||||
run: cmake --build build --config MinSizeRel
|
|
||||||
- name: Upload build artifact
|
|
||||||
uses: actions/upload-artifact@v2
|
|
||||||
with:
|
|
||||||
name: Cosmo-Windows
|
|
||||||
path: bin
|
|
@ -1,5 +1,5 @@
|
|||||||
# Cosmo
|
# Cosmo
|
||||||
[](https://github.com/CPunch/Cosmo/actions/workflows/check_build.yaml)
|
[](https://ci.appveyor.com/project/CPunch/Cosmo)
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
|
33
appveyor.yml
Normal file
33
appveyor.yml
Normal file
@ -0,0 +1,33 @@
|
|||||||
|
version: 'cosmo-0.1.{build}'
|
||||||
|
|
||||||
|
# we compile every commit under all branches
|
||||||
|
#branch:
|
||||||
|
# only:
|
||||||
|
# - main
|
||||||
|
|
||||||
|
# only run CI if we changed actual code
|
||||||
|
only_commits:
|
||||||
|
files:
|
||||||
|
- src/
|
||||||
|
- main.c
|
||||||
|
- Makefile
|
||||||
|
- CMakeLists.txt
|
||||||
|
- appveyor.yml
|
||||||
|
|
||||||
|
# images we're using
|
||||||
|
image:
|
||||||
|
- Ubuntu2004
|
||||||
|
|
||||||
|
platform:
|
||||||
|
- x64
|
||||||
|
|
||||||
|
install:
|
||||||
|
- sudo apt install clang cmake -y
|
||||||
|
|
||||||
|
build_script:
|
||||||
|
- make && ./bin/cosmo examples/testsuite.cosmo -s examples/getters_setters.cosmo
|
||||||
|
|
||||||
|
artifacts:
|
||||||
|
- path: bin
|
||||||
|
name: ubuntu20_04-bin-x64
|
||||||
|
type: zip
|
@ -56,7 +56,7 @@ void *cosmoM_reallocate(CState *state, void *buf, size_t oldSize, size_t newSize
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (newBuf == NULL) {
|
if (newBuf == NULL) {
|
||||||
printf("[ERROR] failed to allocate memory!");
|
CERROR("failed to allocate memory!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,4 +64,6 @@ typedef int (*cosmo_Writer)(CState *state, const void *data, size_t size, const
|
|||||||
#define UNNAMEDCHUNK "_main"
|
#define UNNAMEDCHUNK "_main"
|
||||||
#define COSMOASSERT(x) assert(x)
|
#define COSMOASSERT(x) assert(x)
|
||||||
|
|
||||||
|
#define CERROR(err) printf("%s : %s\n", "[ERROR]", err)
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -32,7 +32,7 @@ CState *cosmoV_newState()
|
|||||||
CState *state = malloc(sizeof(CState));
|
CState *state = malloc(sizeof(CState));
|
||||||
|
|
||||||
if (state == NULL) {
|
if (state == NULL) {
|
||||||
printf("[ERROR] failed to allocate memory!");
|
CERROR("failed to allocate memory!");
|
||||||
exit(1);
|
exit(1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -696,7 +696,7 @@ static inline uint16_t READUINT(CCallFrame *frame)
|
|||||||
# define SWITCH switch (READBYTE(frame))
|
# define SWITCH switch (READBYTE(frame))
|
||||||
# define DEFAULT \
|
# define DEFAULT \
|
||||||
default: \
|
default: \
|
||||||
printf("[ERROR] unknown opcode!"); \
|
CERROR("unknown opcode!"); \
|
||||||
exit(0)
|
exit(0)
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user