@@ -102,3 +102,69 @@ jobs:
102102
103103 - name : ' Check documentation links in `libmimalloc-sys`'
104104 run : cargo rustdoc -p libmimalloc-sys2 -- -D warnings
105+
106+ build-example :
107+ name : Build example
108+ strategy :
109+ matrix :
110+ settings :
111+ - host : macos-latest
112+ target : x86_64-apple-darwin
113+ - host : windows-latest
114+ target : x86_64-pc-windows-msvc
115+ - host : windows-latest
116+ target : i686-pc-windows-msvc
117+ - host : ubuntu-latest
118+ target : x86_64-unknown-linux-gnu
119+ - host : ubuntu-latest
120+ target : x86_64-unknown-linux-musl
121+ - host : macos-latest
122+ target : aarch64-apple-darwin
123+ - host : ubuntu-24.04-arm
124+ target : aarch64-unknown-linux-gnu
125+ - host : ubuntu-latest
126+ target : armv7-unknown-linux-gnueabihf
127+ - host : ubuntu-latest
128+ target : aarch64-linux-android
129+ - host : ubuntu-latest
130+ target : armv7-linux-androideabi
131+ - host : ubuntu-24.04-arm
132+ target : aarch64-unknown-linux-musl
133+ - host : windows-latest
134+ target : aarch64-pc-windows-msvc
135+ - host : ubuntu-latest
136+ target : powerpc64le-unknown-linux-gnu
137+ - host : ubuntu-latest
138+ target : s390x-unknown-linux-gnu
139+ - host : ubuntu-latest
140+ target : wasm32-wasip1-threads
141+
142+ runs-on : ${{ matrix.settings.host }}
143+
144+ steps :
145+ - uses : actions/checkout@v4
146+ with :
147+ submodules : recursive
148+
149+ - name : Install
150+ run : rustup target add ${{ matrix.settings.target }}
151+
152+ - uses : actions/setup-node@v4
153+ with :
154+ node-version : 22
155+ cache : yarn
156+
157+ - name : Install dependencies
158+ working-directory : example
159+ run : yarn install
160+
161+ - name : Build
162+ working-directory : example
163+ run : |
164+ if [[ "${{ matrix.settings.target }}" == *"musl"* ]]; then
165+ yarn build --target ${{ matrix.settings.target }} -x
166+ elif [[ "${{ matrix.settings.target }}" == *"gnu"* ]]; then
167+ yarn build --target ${{ matrix.settings.target }} --use-napi-cross
168+ else
169+ yarn build --target ${{ matrix.settings.target }}
170+ fi
0 commit comments