Skip to content

[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) #9

[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes)

[ENG-1184, ENG-1286, ENG-1330] Rework native dependencies (+ deb fixes) #9

Workflow file for this run

name: Build native deps
on:
push:
paths:
- '.github/workflows/native-deps.yml'
- '.github/scripts/native-deps/**'
branches:
- main
pull_request:
paths:
- '.github/workflows/native-deps.yml'
- '.github/scripts/native-deps/**'
workflow_dispatch:
# Cancel previous runs of the same workflow on the same branch.
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build-native-deps:
strategy:
matrix:
settings:
- target: x86_64-darwin-apple
- target: aarch64-darwin-apple
- target: x86_64-windows-gnu
- target: aarch64-windows-gnu
- target: x86_64-linux-gnu
- target: aarch64-linux-gnu
# - target: x86_64-linux-musl
# - target: aarch64-linux-musl
name: Build native-deps ${{ matrix.settings.target }}
runs-on: ubuntu-latest
defaults:
run:
shell: bash
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v2
with:
install: true
platforms: linux/amd64
driver-opts: |
image=moby/buildkit:master
network=host
- name: Build native-deps
run: |
set -euxo pipefail
cd .github/native-deps
docker build --no-cache --build-arg TARGET=${{ matrix.settings.target }} -o . .
mv out/src.tar.xz ./native-deps-${{ matrix.settings.target }}-src.tar.xz
export XZ_OPT='-T0 -7'
tar -cJf "native-deps-${{ matrix.settings.target }}.tar.xz" -C out .
- name: Publish native-deps
uses: actions/upload-artifact@v3
with:
name: native-deps-${{ matrix.settings.target }}
path: .github/native-deps/native-deps-${{ matrix.settings.target }}.tar.xz
if-no-files-found: error
- name: Publish built source
uses: actions/upload-artifact@v3
with:
name: native-deps-${{ matrix.settings.target }}-src
path: .github/native-deps/native-deps-${{ matrix.settings.target }}.tar.xz
if-no-files-found: warn