Skip to content

Commit 37c3179

Browse files
committed
Build action.
1 parent 6c648a9 commit 37c3179

File tree

3 files changed

+33
-3
lines changed

3 files changed

+33
-3
lines changed

.github/workflows/build.sh

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/bin/bash
2+
3+
set -Eeuo pipefail
4+
5+
JVER=3.0.3
6+
if [ ! -d "libjpeg-turbo-$JVER" ]; then
7+
url="https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$JVER/libjpeg-turbo-$JVER-gcc64.exe"
8+
mkdir "libjpeg-turbo-$JVER"
9+
pushd "libjpeg-turbo-$JVER"
10+
curl -sL "$url" > archive.7z
11+
7z x archive.7z
12+
popd
13+
fi
14+
15+
gcc -O3 -o dcraw.exe dcraw.c -lws2_32 -DNO_JASPER -DNO_LCMS \
16+
-I"libjpeg-turbo-$JVER/include" "libjpeg-turbo-$JVER/lib/libjpeg.dll.a"
17+
18+
cp "libjpeg-turbo-$JVER/bin/libjpeg-62.dll" .
19+
20+
7z a -mx9 dcraw-windows.zip dcraw.exe libjpeg-62.dll

.github/workflows/dist.yml

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,16 @@ on:
66
jobs:
77

88
build:
9-
runs-on: ubuntu-latest
9+
runs-on: windows-latest
1010

1111
steps:
12-
- name: Placeholder
13-
run: true
12+
- uses: actions/checkout@v4
13+
14+
- name: Build artifact
15+
run: .github/workflows/build.sh
16+
shell: bash
17+
18+
- name: Upload artifact
19+
uses: actions/upload-artifact@v4
20+
with:
21+
path: dcraw-windows.zip

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
build*/
2+
libjpeg-turbo*/

0 commit comments

Comments
 (0)