-
Notifications
You must be signed in to change notification settings - Fork 51
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
db8216a
commit e80c89d
Showing
7 changed files
with
212 additions
and
120 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: linux-precompile | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
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-arm-linux-gnueabihf g++-arm-linux-gnueabihf \ | ||
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/') | ||
with: | ||
files: | | ||
cache/*.tar.gz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: macos-precompile | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
precompile: | ||
runs-on: macos-14 | ||
env: | ||
MIX_ENV: prod | ||
strategy: | ||
matrix: | ||
arch: | ||
- x86_64-apple-darwin | ||
- arm64-apple-darwin | ||
job: | ||
- {otp: "27.0.1", elixir: "1.17.2"} | ||
- {otp: "25.3.2.13", elixir: "1.16.3"} | ||
|
||
name: Mac ${{ matrix.arch }} - OTP ${{ matrix.job.otp }} - Elixir ${{ matrix.job.elixir }} | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Install asdf | ||
uses: asdf-vm/actions/setup@v2 | ||
|
||
- name: Cache asdf | ||
id: asdf-cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.asdf | ||
key: asdf-${{ runner.os }}-build-${{ matrix.job.otp }}-${{ matrix.job.elixir }} | ||
|
||
- if: ${{ steps.asdf-cache.outputs.cache-hit != 'true' }} | ||
name: Install Erlang & Elixir | ||
env: | ||
ELIXIR_VERSION: ${{ matrix.job.elixir }} | ||
OTP_VERSION: ${{ matrix.job.otp }} | ||
run: | | ||
asdf plugin-add erlang | ||
asdf install erlang ${OTP_VERSION} | ||
ELIXIR_OTP_VERSION=$(echo $OTP_VERSION | cut -d. -f1) | ||
asdf plugin-add elixir | ||
asdf install elixir ${ELIXIR_VERSION}-otp-${ELIXIR_OTP_VERSION} | ||
- name: Setup Erlang & Elixir | ||
env: | ||
ELIXIR_VERSION: ${{ matrix.job.elixir }} | ||
OTP_VERSION: ${{ matrix.job.otp }} | ||
run: | | ||
asdf global erlang ${OTP_VERSION} | ||
ELIXIR_OTP_VERSION=$(echo $OTP_VERSION | cut -d. -f1) | ||
asdf global elixir ${ELIXIR_VERSION}-otp-${ELIXIR_OTP_VERSION} | ||
- name: Install hex & rebar | ||
run: | | ||
mix local.hex --force | ||
mix local.rebar --force | ||
- name: Pre-compile NIF library | ||
run: | | ||
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/*.tar.gz |
This file was deleted.
Oops, something went wrong.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
name: windows-precompile | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
precompile: | ||
runs-on: windows-2019 | ||
env: | ||
MIX_ENV: prod | ||
strategy: | ||
matrix: | ||
arch: | ||
- x64 | ||
job: | ||
- {otp: "27", elixir: "1.17"} | ||
- {otp: "25", elixir: "1.14"} | ||
|
||
name: Windows ${{ 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 }} | ||
|
||
- uses: ilammy/msvc-dev-cmd@v1 | ||
with: | ||
arch: ${{ matrix.arch }} | ||
|
||
- name: Pre-compile NIF library | ||
shell: bash | ||
run: | | ||
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/*.tar.gz |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,3 +20,6 @@ exqlite-*.tar | |
# Temporary files for example tests | ||
/tmp | ||
*.db | ||
|
||
# Let the local developer choose | ||
.tool-versions |
This file was deleted.
Oops, something went wrong.
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