Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: clean CI matrix #15

Merged
merged 4 commits into from
Oct 31, 2023
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
33 changes: 17 additions & 16 deletions .github/workflows/binaries.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,35 +16,36 @@ on:

jobs:
build_binary:
name: ${{ matrix.job.target }} / ${{ matrix.job.os }}
runs-on: ${{ matrix.job.os }}
name: ${{ matrix.target }} / ${{ matrix.os }}
runs-on: ${{ matrix.os }}
permissions:
contents: write
strategy:
fail-fast: false
matrix:
nif_version: ["2.16"]
job:
- { target: aarch64-apple-darwin , os: macos-12 }
- { target: aarch64-unknown-linux-gnu , os: ubuntu-22.04, use-cross: true }
- { target: x86_64-apple-darwin , os: macos-12 }
- { target: x86_64-unknown-linux-gnu , os: ubuntu-22.04 }
env:
VERSION: "0.1.2"

include:
- target: aarch64-apple-darwin
os: macos-12
- target: aarch64-unknown-linux-gnu
os: ubuntu-22.04
use-cross: true
- target: x86_64-apple-darwin
os: macos-12
- target: x86_64-unknown-linux-gnu
os: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- run: rustup target add ${{ matrix.job.target }}
- run: rustup target add ${{ matrix.target }}

- uses: philss/rustler-precompiled-action@main
id: precompile
with:
project-dir: "native/candlex"
project-name: candlex
project-version: ${{ env.VERSION }}
target: ${{ matrix.job.target }}
use-cross: ${{ matrix.job.use-cross }}
nif-version: ${{ matrix.nif_version }}
project-version: "0.1.2"
target: ${{ matrix.target }}
use-cross: ${{ matrix.use-cross }}
nif-version: "2.16"

- uses: softprops/action-gh-release@v1
with:
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,7 +62,7 @@ You will need the following installed in your system for the compilation:

To publish a new version of this package:

1. Update `@version` in `mix.exs` and `PROJECT_VERSION` in `.github/workflows/binaries.yml`.
1. Update `@version` in `mix.exs` and `project-version` in `.github/workflows/binaries.yml`.
1. `git tag -s <tag-version>` to create new signed tag.
1. `git push origin <tag-version>` to push the tag.
1. Wait for the `binaries.yml` GitHub workflow to build all the NIF binaries.
Expand Down