Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
W
wasi-sdk
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
wasi-sdk
Commits
9e8c9410
Commit
9e8c9410
authored
1 year ago
by
Cheng Shao
Browse files
Options
Downloads
Patches
Plain Diff
ci: add gitlab ci config
parent
e38f4686
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
.gitlab-ci.yml
+173
-0
173 additions, 0 deletions
.gitlab-ci.yml
with
173 additions
and
0 deletions
.gitlab-ci.yml
0 → 100644
+
173
−
0
View file @
9e8c9410
default
:
interruptible
:
true
variables
:
DOCKER_REV
:
eb4d3389fd62e4f7321a0c8799014ec1f4da0708
GIT_DEPTH
:
1
GIT_SUBMODULE_DEPTH
:
1
GIT_SUBMODULE_STRATEGY
:
normal
GZIP
:
"
-9"
.linux
:
image
:
alpine:latest
before_script
:
-
|
apk upgrade
apk add \
alpine-sdk \
autoconf \
automake \
bash \
clang \
cmake \
curl \
gzip \
libtool \
lld \
ninja-is-really-ninja \
python3 \
xz \
zstd
-
|
curl -f -L --retry 5 https://github.com/tweag/rust-alpine-mimalloc/archive/refs/heads/master.tar.gz | tar xz -C /tmp
mv /tmp/rust-alpine-mimalloc-master/mimalloc.diff /tmp
/tmp/rust-alpine-mimalloc-master/build.sh
export LD_PRELOAD=/usr/lib/libmimalloc.so
-
|
mkdir wasm-tools
if [ "$(uname -m)" = "x86_64" ]
then
curl -f -L --retry 5 https://github.com/haskell-wasm/wasm-tools-static/releases/download/241122/wasm-tools-241122-x86_64-linux.tar.zst | tar x --zstd -C wasm-tools --strip-components=1
else
curl -f -L --retry 5 https://github.com/haskell-wasm/wasm-tools-static/releases/download/241122/wasm-tools-241122-aarch64-linux.tar.zst | tar x --zstd -C wasm-tools --strip-components=1
fi
export PATH=$PWD/wasm-tools/bin:$PATH
-
|
mkdir binaryen
if [ "$(uname -m)" = "x86_64" ]
then
curl -f -L --retry 5 https://github.com/haskell-wasm/binaryen/releases/download/version_121/binaryen-version_121-x86_64-linux-static.tar.gz | tar xz -C binaryen --strip-components=1
else
curl -f -L --retry 5 https://github.com/haskell-wasm/binaryen/releases/download/version_121/binaryen-version_121-aarch64-linux-static.tar.gz | tar xz -C binaryen --strip-components=1
fi
export PATH=$PWD/binaryen/bin:$PATH
script
:
-
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS="-DCMAKE_C_COMPILER=clang -DCMAKE_CXX_COMPILER=clang++ -DLLVM_BUILD_STATIC=ON -DLLVM_ENABLE_LLD=ON -DLLVM_ENABLE_LTO=Thin -DLLVM_ENABLE_PIC=OFF -DLLVM_PARALLEL_LINK_JOBS=1" ./ci/build.sh
-
find build/install/share/wasi-sysroot -name '*.so' -exec wasm-opt --low-memory-unused --debuginfo --converge --gufa -Oz {} -o {} \;
-
ln -s build/dist dist-unknown
-
./ci/merge-artifacts.sh
-
mkdir /tmp/wasi-sdk
-
tar xzf dist/wasi-sdk-*.tar.gz -C /tmp/wasi-sdk --strip-components=1
-
curl -f -L --retry 5 https://github.com/bitcoin-core/secp256k1/archive/refs/tags/v0.6.0.tar.gz | tar xz -C /tmp
-
cd /tmp/secp256k1-*
-
./autogen.sh
-
./configure CC=/tmp/wasi-sdk/bin/wasm32-wasi-clang --host=wasm32-wasi --enable-module-schnorrsig --enable-examples CPPFLAGS=-D__OpenBSD__
-
make schnorr_example
-
wasmtime schnorr_example | grep -F
true
artifacts
:
expire_in
:
1 year
paths
:
-
dist/wasi-sdk-*.tar.gz
x86_64-linux
:
extends
:
.linux
tags
:
-
x86_64-linux
ghc-ci
:
needs
:
-
job
:
x86_64-linux
artifacts
:
false
variables
:
UPSTREAM_WASI_SDK_PIPELINE_ID
:
$CI_PIPELINE_ID
parallel
:
matrix
:
-
GHC_BRANCH
:
-
ghc-9.12
-
ghc-9.10
-
ghc-9.8
-
ghc-9.6
trigger
:
project
:
haskell-wasm/ghc
branch
:
$GHC_BRANCH
x86_64-linux-ghc-bindist
:
image
:
registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-alpine3_20:$DOCKER_REV
needs
:
-
job
:
x86_64-linux
artifacts
:
true
script
:
-
|
curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc-wasm-meta/-/archive/master/ghc-wasm-meta-master.tar.gz | tar xz
cd ghc-wasm-meta-*
SKIP_GHC=1 ./setup.sh
cd ..
rm -r ghc-wasm-meta-*
-
|
rm -rf /home/ghc/.ghc-wasm/wasi-sdk
mkdir /home/ghc/.ghc-wasm/wasi-sdk
tar xzf dist/wasi-sdk-*.tar.gz -C /home/ghc/.ghc-wasm/wasi-sdk --strip-components=1
-
|
curl -f -L --retry 5 https://github.com/tweag/ghc-wasm-bindists/releases/download/20240930T111148/libffi-wasm -o libffi-wasm.zip
unzip libffi-wasm.zip
cp -a out/libffi-wasm/include/. /home/ghc/.ghc-wasm/wasi-sdk/share/wasi-sysroot/include/wasm32-wasi
cp -a out/libffi-wasm/lib/. /home/ghc/.ghc-wasm/wasi-sdk/share/wasi-sysroot/lib/wasm32-wasi
-
|
mkdir /tmp/ghc-bindist
curl -f -L --retry 5 https://github.com/tweag/ghc-wasm-bindists/releases/download/20230619T174420/wasm32-wasi-ghc-unreg.tar.xz | tar xJ -C /tmp/ghc-bindist --strip-components=1
cd /tmp/ghc-bindist
source "/home/ghc/.ghc-wasm/env"
./configure $CONFIGURE_ARGS --prefix=/tmp/ghc
make install
-
|
mkdir /tmp/ghc-bindist-test
cd /tmp/ghc-bindist-test
curl -f -L --retry 5 https://gitlab.haskell.org/ghc/ghc/-/raw/89bb8ad8b5fa56b83fe80dd6d7147ad81ae4e74d/.gitlab/hello.hs -o hello.hs
/tmp/ghc/bin/wasm32-wasi-ghc -package ghc -rtsopts hello.hs -o hello.wasm
wasmtime run hello.wasm | grep -F 'main = putStrLn "hello world"'
tags
:
-
x86_64-linux
variables
:
GIT_STRATEGY
:
none
GIT_SUBMODULE_STRATEGY
:
none
aarch64-linux
:
extends
:
.linux
tags
:
-
aarch64-linux
.darwin
:
tags
:
-
aarch64-darwin
before_script
:
-
sw_vers
-
xcrun --show-sdk-path
-
xcrun --show-sdk-version
-
|
mkdir wasm-tools
curl -f -L --retry 5 https://github.com/haskell-wasm/wasm-tools-static/releases/download/241122/wasm-tools-241122-darwin-aarch64.tar.zst | tar x --zstd -C wasm-tools --strip-components=1
export PATH=$PWD/wasm-tools/bin:$PATH
-
|
mkdir binaryen
curl -f -L --retry 5 https://github.com/WebAssembly/binaryen/releases/download/version_121/binaryen-version_121-arm64-macos.tar.gz | tar xz -C binaryen --strip-components=1
export PATH=$PWD/binaryen/bin:$PATH
script
:
-
./ci/build.sh
-
find build/install/share/wasi-sysroot -name '*.so' -exec wasm-opt --low-memory-unused --debuginfo --converge --gufa -Oz {} -o {} \;
-
ln -s build/dist dist-unknown
-
./ci/merge-artifacts.sh
artifacts
:
expire_in
:
1 year
paths
:
-
dist/wasi-sdk-*.tar.gz
aarch64-darwin
:
extends
:
.darwin
variables
:
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS
:
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -DCMAKE_OSX_ARCHITECTURES=arm64 -DLLVM_ENABLE_LTO=Thin -DLLVM_ENABLE_PIC=OFF -DLLVM_PARALLEL_LINK_JOBS=1
x86_64-darwin
:
extends
:
.darwin
variables
:
WASI_SDK_CI_TOOLCHAIN_LLVM_CMAKE_ARGS
:
-DCMAKE_OSX_DEPLOYMENT_TARGET=13.0 -DCMAKE_OSX_ARCHITECTURES=x86_64 -DLLVM_ENABLE_LTO=Thin -DLLVM_ENABLE_PIC=OFF -DLLVM_PARALLEL_LINK_JOBS=1
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