Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 31 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ on:
branches: [master, dev]
pull_request:
branches: [master, dev]
permissions:
contents: read
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
linux:
runs-on: ubuntu-24.04
Expand Down Expand Up @@ -34,7 +39,7 @@ jobs:
- name: Install libvips build dependencies
run: |
sudo apt-get update
sudo apt-get install \
sudo apt-get install -y \
meson pkg-config \
libarchive-dev libcfitsio-dev libcgif-dev \
libexif-dev libexpat1-dev libffi-dev \
Expand Down Expand Up @@ -64,7 +69,7 @@ jobs:
set -e
mkdir vips
echo "Downloading libvips from: ${VIPS_LATEST_RELEASE}"
curl -s -L "${VIPS_LATEST_RELEASE}" | tar xJ -C ./vips --strip-components=1
curl -fsSL --retry 3 "${VIPS_LATEST_RELEASE}" | tar xJ -C ./vips --strip-components=1
cd vips
echo "Setting up meson build..."
meson setup build -Ddeprecated=false -Dmagick=disabled \
Expand Down Expand Up @@ -161,7 +166,7 @@ jobs:

- name: Remove Artifacts & Generate checksum.exs
run: |
ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache"
export ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache"
rm -rf priv/* _build/*/lib/vix "${ELIXIR_MAKE_CACHE_DIR}"
mix elixir_make.checksum --only-local

Expand Down Expand Up @@ -202,7 +207,7 @@ jobs:
mix local.rebar --force
elixir --version
mix deps.get
ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache"
export ELIXIR_MAKE_CACHE_DIR="$(pwd)/cache"
rm -rf priv/* _build/*/lib/vix "${ELIXIR_MAKE_CACHE_DIR}"
mix elixir_make.checksum --only-local
mix test --trace
Expand All @@ -212,12 +217,31 @@ jobs:
runs-on: macos-14
name: Test macOS
timeout-minutes: 45
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@main
- uses: DeterminateSystems/magic-nix-cache-action@main
- uses: DeterminateSystems/flake-checker-action@main
- uses: DeterminateSystems/nix-installer-action@v22
- uses: DeterminateSystems/flake-checker-action@v12
- run: nix develop --command mix deps.get
- run: nix develop --command mix test --trace

macos-precompiled-libvips:
runs-on: macos-14
name: Test macOS Pre-compiled libvips
timeout-minutes: 45
env:
VIX_COMPILATION_MODE: PRECOMPILED_LIBVIPS
permissions:
contents: read
id-token: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v22
- uses: DeterminateSystems/flake-checker-action@v12
- run: nix develop --command mix deps.get
- run: nix develop --command mix test --trace

Expand Down
22 changes: 14 additions & 8 deletions .github/workflows/precompile.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,15 @@ on:
push:
tags:
- 'v*'
permissions:
contents: read

jobs:
linux:
runs-on: ubuntu-latest
runs-on: ubuntu-24.04
timeout-minutes: 60
permissions:
contents: write
env:
MIX_ENV: "prod"
strategy:
Expand All @@ -19,14 +23,14 @@ jobs:
- elixir: 1.19.x
otp: 27.x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: erlef/setup-beam@v1
with:
otp-version: ${{matrix.otp}}
elixir-version: ${{matrix.elixir}}
- name: Cache musl cross compilers
id: cache-musl
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
x86_64-linux-musl-cross
Expand All @@ -53,7 +57,7 @@ jobs:
export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache
mkdir -p "${ELIXIR_MAKE_CACHE_DIR}"
mix elixir_make.precompile
- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Expand All @@ -62,6 +66,8 @@ jobs:
macos:
runs-on: macos-14
timeout-minutes: 60
permissions:
contents: write
env:
MIX_ENV: "prod"
strategy:
Expand All @@ -72,13 +78,13 @@ jobs:
- elixir: '1.19.0'
otp: '27.0'
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install asdf
uses: asdf-vm/actions/setup@v2
uses: asdf-vm/actions/setup@v4

- name: Cache asdf
id: asdf-cache
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: ~/.asdf
key: asdf-${{ runner.os }}-build-${{ matrix.otp }}-${{ matrix.elixir }}
Expand Down Expand Up @@ -123,7 +129,7 @@ jobs:
export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache
mkdir -p "${ELIXIR_MAKE_CACHE_DIR}"
mix elixir_make.precompile
- uses: softprops/action-gh-release@v1
- uses: softprops/action-gh-release@v2
if: startsWith(github.ref, 'refs/tags/')
with:
files: |
Expand Down
Loading
Loading