Compare commits
6 Commits
85bf1c163c
...
c709c69176
| Author | SHA1 | Date | |
|---|---|---|---|
| c709c69176 | |||
| 1e435f7fdf | |||
| c976378363 | |||
| 5af2e99f5f | |||
| bb1614a123 | |||
| c1fbb02c50 |
@@ -1,76 +0,0 @@
|
|||||||
name: Sex CI
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [main]
|
|
||||||
pull_request:
|
|
||||||
branches: [main]
|
|
||||||
workflow_dispatch:
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
build-linux:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- name: Fetch repository
|
|
||||||
env:
|
|
||||||
GITEA_TOKEN: ${{ secrets.GITEA_TOKEN }}
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
git config --global --add safe.directory "$PWD"
|
|
||||||
git init
|
|
||||||
git remote add origin "${GITHUB_SERVER_URL%/}/${GITHUB_REPOSITORY}.git"
|
|
||||||
git -c http.extraHeader="Authorization: token ${GITEA_TOKEN}" \
|
|
||||||
fetch --depth 1 origin "${GITHUB_SHA}"
|
|
||||||
git checkout --force FETCH_HEAD
|
|
||||||
|
|
||||||
- name: Install toolchain
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
|
||||||
apt-get update
|
|
||||||
apt-get install -y --no-install-recommends build-essential git wget ca-certificates
|
|
||||||
else
|
|
||||||
sudo apt-get update
|
|
||||||
sudo apt-get install -y --no-install-recommends build-essential git wget ca-certificates
|
|
||||||
fi
|
|
||||||
|
|
||||||
- name: Install Chicken
|
|
||||||
env:
|
|
||||||
CHICKEN_VERSION: "6.0.0"
|
|
||||||
CHICKEN_SHA256: 92835552b1b687ad26737e429b5aba36510bf429f8816ec0f6d336c8cb41f443
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
tarball="chicken-${CHICKEN_VERSION}.tar.gz"
|
|
||||||
wget -N "https://code.call-cc.org/releases/${CHICKEN_VERSION}/${tarball}"
|
|
||||||
echo "${CHICKEN_SHA256} ${tarball}" | sha256sum -c
|
|
||||||
tar zxf "${tarball}"
|
|
||||||
(
|
|
||||||
cd "chicken-${CHICKEN_VERSION}"
|
|
||||||
./configure --prefix=/usr/local
|
|
||||||
make -j"$(nproc)"
|
|
||||||
if [ "$(id -u)" -eq 0 ]; then
|
|
||||||
make install
|
|
||||||
else
|
|
||||||
sudo make install
|
|
||||||
fi
|
|
||||||
)
|
|
||||||
hash -r
|
|
||||||
csc -version
|
|
||||||
|
|
||||||
- name: Install eggs
|
|
||||||
run: |
|
|
||||||
set -eu
|
|
||||||
mkdir -p .eggs
|
|
||||||
repo="$(chicken-install -repository)"
|
|
||||||
echo "CHICKEN_INSTALL_REPOSITORY=${PWD}/.eggs" >> "$GITHUB_ENV"
|
|
||||||
echo "CHICKEN_REPOSITORY_PATH=${PWD}/.eggs:${repo}" >> "$GITHUB_ENV"
|
|
||||||
export CHICKEN_INSTALL_REPOSITORY="${PWD}/.eggs"
|
|
||||||
export CHICKEN_REPOSITORY_PATH="${PWD}/.eggs:${repo}"
|
|
||||||
# shellcheck disable=SC2046
|
|
||||||
chicken-install $(cat dependencies.txt)
|
|
||||||
|
|
||||||
- name: Build sexc
|
|
||||||
run: make sexc && ./sexc --help
|
|
||||||
|
|
||||||
- name: Run tests
|
|
||||||
run: make run-tests
|
|
||||||
55
.github/workflows/build.yaml
vendored
Normal file
55
.github/workflows/build.yaml
vendored
Normal file
@@ -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/6.0.0/chicken-6.0.0.tar.gz
|
||||||
|
tar zxf chicken-6.0.0.tar.gz
|
||||||
|
sudo apt install -y make
|
||||||
|
make -C chicken-6.0.0 PLATFORM=linux
|
||||||
|
sudo make -C chicken-6.0.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
|
||||||
Reference in New Issue
Block a user