Skip to content
Snippets Groups Projects
Commit f1c950d6 authored by Cheng Shao's avatar Cheng Shao
Browse files

Add gitlab ci config

parent cbfc8c22
No related branches found
No related tags found
1 merge request!1Gitlab migrate
variables:
DOCKER_REV: 205afce5c7ebdb8666b96638f6758fe527f40a7f
GIT_DEPTH: "1"
x86_64-linux:
tags:
- x86_64-linux
image: registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-ubuntu20_04:$DOCKER_REV
before_script:
- sudo chown ghc:ghc -R .
- |
mkdir -p /tmp/wasi-sdk
curl -f -L --retry 5 https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sdk-16.0-linux.tar.gz | tar xz --strip-components=1 -C /tmp/wasi-sdk
curl -f -L --retry 5 https://wasmtime.dev/install.sh | bash
export WASMTIME_HOME="$HOME/.wasmtime"
export PATH="$WASMTIME_HOME/bin:/tmp/wasi-sdk/bin:$PATH"
script:
- |
BUILD_CORES=$(curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/master/mk/detect-cpu-count.sh | sh)
echo "with-compiler: $GHC" >> cabal.project.local
cabal update
cabal v2-run -j$BUILD_CORES libffi-wasm
clang -Wall -Wextra -O3 -DNDEBUG -Icbits -c cbits/ffi.c -o cbits/ffi.o
clang -Wall -Wextra -O3 -DNDEBUG -Icbits -c cbits/ffi_call.c -o cbits/ffi_call.o
clang -Wall -Wextra -O3 -DNDEBUG -Icbits -c cbits/ffi_closure.c -o cbits/ffi_closure.o
mkdir -p out/libffi-wasm/include
cp cbits/*.h out/libffi-wasm/include
mkdir -p out/libffi-wasm/lib
llvm-ar -r out/libffi-wasm/lib/libffi.a cbits/*.o
pushd cbits_test
CC="clang -Wall -Wextra -O3 -DNDEBUG -I../out/libffi-wasm/include -L../out/libffi-wasm/lib -lffi" ./test.sh
popd
artifacts:
expire_in: 1 year
paths:
- out
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment