Support only NIF 2.17 (OTP 26-28) #14
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Precompile NIFs | |
| on: | |
| push: | |
| tags: | |
| - "v*" | |
| jobs: | |
| # Build all Linux architectures (x86_64, ARM64, ARMv7, RISC-V, i686) | |
| linux: | |
| name: Linux (all architectures) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: "28.1" | |
| elixir-version: "1.19.1" | |
| - name: Install cross-compilation toolchains | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential cmake libssl-dev \ | |
| gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \ | |
| gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ | |
| gcc-riscv64-linux-gnu g++-riscv64-linux-gnu \ | |
| gcc-i686-linux-gnu g++-i686-linux-gnu | |
| - name: Install dependencies | |
| run: mix deps.get | |
| - name: Precompile NIFs (native + cross-compile) | |
| run: | | |
| export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
| mkdir -p $ELIXIR_MAKE_CACHE_DIR | |
| MIX_ENV=prod mix elixir_make.precompile | |
| - name: Upload artifacts to release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: cache/*.tar.gz | |
| draft: true | |
| # Build on macOS (builds both ARM64 and x86_64) | |
| macos: | |
| name: macOS (ARM64 + x86_64) | |
| runs-on: macos-14 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive | |
| - uses: erlef/setup-beam@v1 | |
| with: | |
| otp-version: "28.1" | |
| elixir-version: "1.19.1" | |
| - name: Install dependencies | |
| run: | | |
| brew install cmake openssl | |
| mix deps.get | |
| - name: Precompile NIFs | |
| run: | | |
| export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
| mkdir -p $ELIXIR_MAKE_CACHE_DIR | |
| MIX_ENV=prod mix elixir_make.precompile | |
| - name: Upload artifacts to release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: cache/*.tar.gz | |
| draft: true |