Skip to content

Commit

Permalink
try to build release with bazel
Browse files Browse the repository at this point in the history
  • Loading branch information
eustas committed Mar 8, 2024
1 parent 5e7560d commit de54757
Showing 1 changed file with 69 additions and 1 deletion.
70 changes: 69 additions & 1 deletion .github/workflows/release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ jobs:
repo-token: ${{ secrets.GITHUB_TOKEN }}


windows_build:
windows_vcpkg_build:
name: Windows Build (vcpkg / ${{ matrix.triplet }})
runs-on: [windows-2022]
strategy:
Expand Down Expand Up @@ -388,3 +388,71 @@ jobs:
with:
files: jxl-${{matrix.triplet}}.zip
repo-token: ${{ secrets.GITHUB_TOKEN }}

windows_bazel_build:
name: Windows Bazel Build
runs-on: [windows-2022]

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout the source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true

- name: Patch
shell: 'bash'
run: |
# cd third_party/highway
# git fetch origin 31fbbd7ce1e4179a32d86688cd67316556f582bf
# git checkout 31fbbd7ce1e4179a32d86688cd67316556f582bf
# git apply ${{ github.workspace }}/.github/workflows/highway.patch
- name: Build
shell: 'bash'
run: bazel build -c opt ...:all

windows_cmake_build:
name: Windows CMake Build
runs-on: [windows-2022]

steps:
- name: Harden Runner
uses: step-security/harden-runner@63c24ba6bd7ba022e95695ff85de572c04a18142 # v2.7.0
with:
egress-policy: audit

- name: Checkout the source
uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
with:
submodules: true

- name: CMake configure
shell: 'bash'
run: |
set -x
choco install ninja pkgconfiglite
export CC=clang
export CXX=clang++
export PREFIX=`pwd`/local
mkdir "${PREFIX}"
cd third_party
cd zlib
cmake -DCMAKE_BUILD_TYPE=Release -B build -G Ninja -DCMAKE_INSTALL_PREFIX=${PREFIX}/zlib
cmake --build build
cmake --install build --prefix "${PREFIX}"/zlib
cd ..
cd libpng
cmake -DCMAKE_BUILD_TYPE=Release -B build -G Ninja -DCMAKE_INSTALL_PREFIX=${PREFIX}/libpng -DCMAKE_PREFIX_PATH=${PREFIX}/zlib
cmake --build build
cmake --install build --prefix "${PREFIX}"/libpng
cd ..
cd ..
cmake -DCMAKE_BUILD_TYPE=Release -DJPEGXL_ENABLE_JNI=OFF -DJPEGXL_ENABLE_MANPAGES=OFF -B build -DCMAKE_PREFIX_PATH=${PREFIX}/zlib:${PREFIX}/libpng -G Ninja --debug-output
- name: CMake build
run: cmake --build build

0 comments on commit de54757

Please sign in to comment.