diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml new file mode 100644 index 0000000..90b3486 --- /dev/null +++ b/.github/workflows/build.yaml @@ -0,0 +1,55 @@ +name: Sex CI + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + build-linux: + + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + - name: Install chicken + run: | + wget -N https://code.call-cc.org/releases/5.4.0/chicken-5.4.0.tar.gz + tar zxf chicken-5.4.0.tar.gz + sudo apt install -y make + make -C chicken-5.4.0 PLATFORM=linux + sudo make -C chicken-5.4.0 PLATFORM=linux install + - name: Install dependencies + # FIXME: [project-local deps]: use venv or something + # run: make deps + run: sudo chicken-install $(cat dependencies.txt) + - name: Make sure that sexc builds + # FIXME: sexc being built with local .eggs/ libs needs the path at runtime. + # Without it there will be `Error: cannot load extension: fmt`. + run: make sexc && ./sexc --help + - name: Run tests + # FIXME: [project-local deps]: use local deps or build with -static + # run: make run-tests + run: make sex-tests && ./sex-tests + + build-macos: + + runs-on: macos-15 + + steps: + - uses: actions/checkout@v3 + - name: Install chicken + run: brew install chicken make + - name: Install dependencies + # FIXME: [project-local deps]: use venv or something + # run: make deps + run: chicken-install $(cat dependencies.txt) + - name: Make sure that sexc builds + # FIXME: sexc being built with local .eggs/ libs needs the path at runtime. + # Without it there will be `Error: cannot load extension: fmt`. + run: make sexc && ./sexc --help + - name: Run tests + # FIXME: [project-local deps]: use local deps or build with -static + # run: make run-tests + run: make sex-tests && ./sex-tests diff --git a/Readme.org b/Readme.org index ef990a5..cba3fa3 100644 --- a/Readme.org +++ b/Readme.org @@ -13,7 +13,7 @@ to export ~CHICKEN_INSTALL_REPOSITORY~ and ~CHICKEN_REPOSITORY_PATH~ environment variables. Refer to the documentation for more info: https://wiki.call-cc.org/man/5/Extension%20tools#changing-the-repository-location -~chicken-install fmt getopt-long brev-separate test tree srfi-1 srfi-13 srfi-69 matchable~ +~chicken-install `cat dependencies.txt`~ ** Compilation ~make~ @@ -119,7 +119,7 @@ return Sex code. `(if (< 0 ,call) (begin (puts ,message) - (return ,ret-code))))) + (return ,ret-code)))) (pub fn int init () (check-sdl-return diff --git a/dependencies.txt b/dependencies.txt new file mode 100644 index 0000000..e341eb9 --- /dev/null +++ b/dependencies.txt @@ -0,0 +1 @@ +fmt getopt-long brev-separate test tree srfi-1 srfi-13 srfi-69 matchable