mirror of
https://github.com/YosysHQ/yosys
synced 2025-08-11 13:40:53 +00:00
CI: install flex for WASI builds.
This commit is contained in:
parent
49abdc8d3a
commit
760b5041c1
1 changed files with 16 additions and 4 deletions
20
.github/workflows/extra-builds.yml
vendored
20
.github/workflows/extra-builds.yml
vendored
|
@ -33,13 +33,13 @@ jobs:
|
||||||
with:
|
with:
|
||||||
name: vcxsrc
|
name: vcxsrc
|
||||||
path: yosys-win32-vcxsrc-latest.zip
|
path: yosys-win32-vcxsrc-latest.zip
|
||||||
|
|
||||||
vs-build:
|
vs-build:
|
||||||
name: Visual Studio build
|
name: Visual Studio build
|
||||||
runs-on: windows-latest
|
runs-on: windows-latest
|
||||||
needs: [vs-prep, pre_job]
|
needs: [vs-prep, pre_job]
|
||||||
if: needs.pre_job.outputs.should_skip != 'true'
|
if: needs.pre_job.outputs.should_skip != 'true'
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/download-artifact@v4
|
- uses: actions/download-artifact@v4
|
||||||
with:
|
with:
|
||||||
name: vcxsrc
|
name: vcxsrc
|
||||||
|
@ -67,11 +67,21 @@ jobs:
|
||||||
WASI_SDK=wasi-sdk-19.0
|
WASI_SDK=wasi-sdk-19.0
|
||||||
WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz
|
WASI_SDK_URL=https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-19/wasi-sdk-19.0-linux.tar.gz
|
||||||
if ! [ -d ${WASI_SDK} ]; then curl -L ${WASI_SDK_URL} | tar xzf -; fi
|
if ! [ -d ${WASI_SDK} ]; then curl -L ${WASI_SDK_URL} | tar xzf -; fi
|
||||||
ln -s /usr/include/FlexLexer.h ${WASI_SDK}/share/wasi-sysroot/include/
|
|
||||||
|
FLEX_VER=2.6.4
|
||||||
|
FLEX=flex-${FLEX_VER}
|
||||||
|
FLEX_URL=https://github.com/westes/flex/releases/download/v${FLEX_VER}/${FLEX}.tar.gz
|
||||||
|
if ! [ -d ${FLEX} ]; then curl -L ${FLEX_URL} | tar xzf -; fi
|
||||||
|
|
||||||
|
mkdir -p flex-build
|
||||||
|
(cd flex-build &&
|
||||||
|
../${FLEX}/configure --prefix=$(pwd)/../flex-prefix &&
|
||||||
|
make &&
|
||||||
|
make install)
|
||||||
|
|
||||||
mkdir -p build
|
mkdir -p build
|
||||||
cat > build/Makefile.conf <<END
|
cat > build/Makefile.conf <<END
|
||||||
export PATH := $(pwd)/${WASI_SDK}/bin:${PATH}
|
export PATH := $(pwd)/${WASI_SDK}/bin:$(pwd)/${FLEX}/bin:${PATH}
|
||||||
WASI_SYSROOT := $(pwd)/${WASI_SDK}/share/wasi-sysroot
|
WASI_SYSROOT := $(pwd)/${WASI_SDK}/share/wasi-sysroot
|
||||||
|
|
||||||
CONFIG := wasi
|
CONFIG := wasi
|
||||||
|
@ -81,6 +91,8 @@ jobs:
|
||||||
ENABLE_READLINE := 0
|
ENABLE_READLINE := 0
|
||||||
ENABLE_PLUGINS := 0
|
ENABLE_PLUGINS := 0
|
||||||
ENABLE_ZLIB := 0
|
ENABLE_ZLIB := 0
|
||||||
|
|
||||||
|
CXXFLAGS += -I$(pwd)/${FLEX}/include
|
||||||
END
|
END
|
||||||
|
|
||||||
make -C build -f ../Makefile CXX=clang -j$(nproc)
|
make -C build -f ../Makefile CXX=clang -j$(nproc)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue