Bump to v0.27.0 #12
Workflow file for this run
This file contains 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: linux-precompile | |
on: | |
push: | |
tags: | |
- 'v*' | |
permissions: | |
contents: write | |
jobs: | |
armv7l-linux-gnueabihf: | |
runs-on: ubuntu-latest | |
env: | |
ARCH: armv7l | |
TARGET: armv7l-linux-gnueabihf | |
strategy: | |
matrix: | |
job: | |
- {otp: "27.1.1", elixir: "1.17"} | |
- {otp: "25.3.2.14", elixir: "1.16"} | |
name: Linux armv7l - OTP ${{ matrix.job.otp }} - Elixir ${{ matrix.job.elixir }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.job.otp }} | |
elixir-version: ${{ matrix.job.elixir }} | |
- name: Install system dependecies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential automake autoconf pkg-config \ | |
bc m4 unzip zip gcc g++ | |
- name: Install armv7l specific deps | |
run: sudo apt-get install -y gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf | |
- name: Create precompiled ${{ env.ARCH }} library | |
run: | | |
ROOTDIR="$(pwd)" | |
OTP_ROOTDIR="${ROOTDIR}/.tools/otp" | |
mkdir -p "${OTP_ROOTDIR}" | |
cd "${OTP_ROOTDIR}" | |
curl -fSL "https://github.com/cocoa-xu/otp-build/releases/download/v${{ matrix.job.otp }}/otp-${{ env.TARGET }}.tar.gz" -o "otp-${{ env.TARGET }}.tar.gz" | |
tar -xzf "otp-${{ env.TARGET }}.tar.gz" | |
cd "${ROOTDIR}" | |
export PRECOMPILE_ERL_EI_INCLUDE_DIR="${OTP_ROOTDIR}/usr/local/lib/erlang/usr/include" | |
export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
mkdir -p "${ELIXIR_MAKE_CACHE_DIR}" | |
mix deps.get | |
mix elixir_make.precompile | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') | |
with: | |
files: | | |
cache/*${{ env.TARGET }}*.tar.gz | |
precompile: | |
runs-on: ubuntu-20.04 | |
env: | |
MIX_ENV: prod | |
strategy: | |
matrix: | |
arch: | |
- x86_64 | |
- aarch64 | |
- riscv64 | |
job: | |
- {otp: "27", elixir: "1.17"} | |
- {otp: "25", elixir: "1.16"} | |
name: Linux ${{ matrix.arch }} - OTP ${{ matrix.job.otp }} - Elixir ${{ matrix.job.elixir }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- uses: erlef/setup-beam@v1 | |
with: | |
otp-version: ${{ matrix.job.otp }} | |
elixir-version: ${{ matrix.job.elixir }} | |
- name: Install system dependecies | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y \ | |
build-essential automake autoconf pkg-config \ | |
bc m4 unzip zip gcc g++ | |
- name: Install x86_64 specific deps | |
if: matrix.arch == 'x86_64' | |
run: | | |
sudo apt-get install -y gcc-i686-linux-gnu g++-i686-linux-gnu \ | |
gcc-powerpc64le-linux-gnu g++-powerpc64le-linux-gnu \ | |
gcc-s390x-linux-gnu g++-s390x-linux-gnu | |
- name: Install aarch64 specific deps | |
if: matrix.arch == 'aarch64' | |
run: sudo apt-get install -y gcc-aarch64-linux-gnu g++-aarch64-linux-gnu | |
- name: Install riscv64 specific deps | |
if: matrix.arch == 'riscv64' | |
run: sudo apt-get install -y gcc-riscv64-linux-gnu g++-riscv64-linux-gnu | |
- name: Get musl ${{ matrix.arch }} cross-compilers | |
run: | | |
wget "https://musl.cc/${{matrix.arch}}-linux-musl-cross.tgz" -O "${{matrix.arch}}-linux-musl-cross.tgz" | |
tar -xf "${{matrix.arch}}-linux-musl-cross.tgz" | |
- name: Create precompiled ${{ matrix.arch }} library | |
run: | | |
export PATH="$(pwd)/${{ matrix.arch }}-linux-musl-cross/bin:${PATH}" | |
export ELIXIR_MAKE_CACHE_DIR=$(pwd)/cache | |
mkdir -p "${ELIXIR_MAKE_CACHE_DIR}" | |
mix deps.get | |
mix elixir_make.precompile | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') && matrix.arch == 'x86_64' | |
with: | |
files: | | |
cache/*.tar.gz | |
- uses: softprops/action-gh-release@v1 | |
if: startsWith(github.ref, 'refs/tags/') && matrix.arch != 'x86_64' | |
with: | |
files: | | |
cache/*${{ matrix.arch }}*.tar.gz |