Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
L
libffi-wasm
Manage
Activity
Members
Labels
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
haskell-wasm
libffi-wasm
Commits
f1c950d6
Commit
f1c950d6
authored
2 years ago
by
Cheng Shao
Browse files
Options
Downloads
Patches
Plain Diff
Add gitlab ci config
parent
cbfc8c22
No related branches found
No related tags found
1 merge request
!1
Gitlab migrate
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+40
-0
40 additions, 0 deletions
.gitlab-ci.yml
with
40 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
40
−
0
View file @
f1c950d6
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment