-
Notifications
You must be signed in to change notification settings - Fork 3
37 lines (34 loc) · 1.13 KB
/
build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
on: push
name: build and upload artifacts
jobs:
build:
name: Build - ${{ matrix.platform.os }} ${{ matrix.arch }}
strategy:
matrix:
platform:
- os: linux
target_suffix: -unknown-linux-gnu
output: libvenbind.so
arch: [x86_64]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
submodules: true
- uses: cachix/install-nix-action@v26
- uses: cachix/cachix-action@v14
with:
name: devenv
- name: Install devenv.sh
run: nix profile install nixpkgs#devenv
- name: Build
shell: devenv shell bash -- -e {0}
run: |
cargo build --release --target ${{ matrix.arch }}${{ matrix.platform.target_suffix }}
mkdir dist
cp ./target/release/${{ matrix.platform.output }} ./dist/venbind-${{ matrix.platform.os }}-${{ matrix.arch }}.node
- name: Upload
uses: actions/upload-artifact@v4
with:
name: ${{ matrix.platform.os }}-${{ matrix.arch }}
path: ./dist/venbind-${{ matrix.platform.os }}-${{ matrix.arch }}.node