Skip to content

Commit

Permalink
Build action.
Browse files Browse the repository at this point in the history
  • Loading branch information
ncruces committed Jul 8, 2024
1 parent 6c648a9 commit 37c3179
Show file tree
Hide file tree
Showing 3 changed files with 33 additions and 3 deletions.
20 changes: 20 additions & 0 deletions .github/workflows/build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

set -Eeuo pipefail

JVER=3.0.3
if [ ! -d "libjpeg-turbo-$JVER" ]; then
url="https://github.com/libjpeg-turbo/libjpeg-turbo/releases/download/$JVER/libjpeg-turbo-$JVER-gcc64.exe"
mkdir "libjpeg-turbo-$JVER"
pushd "libjpeg-turbo-$JVER"
curl -sL "$url" > archive.7z
7z x archive.7z
popd
fi

gcc -O3 -o dcraw.exe dcraw.c -lws2_32 -DNO_JASPER -DNO_LCMS \
-I"libjpeg-turbo-$JVER/include" "libjpeg-turbo-$JVER/lib/libjpeg.dll.a"

cp "libjpeg-turbo-$JVER/bin/libjpeg-62.dll" .

7z a -mx9 dcraw-windows.zip dcraw.exe libjpeg-62.dll
14 changes: 11 additions & 3 deletions .github/workflows/dist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,16 @@ on:
jobs:

build:
runs-on: ubuntu-latest
runs-on: windows-latest

steps:
- name: Placeholder
run: true
- uses: actions/checkout@v4

- name: Build artifact
run: .github/workflows/build.sh
shell: bash

- name: Upload artifact
uses: actions/upload-artifact@v4
with:
path: dcraw-windows.zip
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
build*/
libjpeg-turbo*/

0 comments on commit 37c3179

Please sign in to comment.