This repository has been archived by the owner on Aug 27, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 14
56 lines (53 loc) · 1.67 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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
name: Build
on: [ push, pull_request ]
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
check:
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12
continue-on-error: true
with:
name: enarx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: nix flake check -L --show-trace --keep-going
build:
needs: [ check ]
strategy:
matrix:
output:
- chat-client-c
- chat-client-cpp
- chat-client-rust
- chat-server-rust
- cryptle-rust
- fibonacci-c
- fibonacci-cpp
- fibonacci-go
- fibonacci-rust
- fibonacci-zig
runs-on: ubuntu-20.04
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- uses: cachix/cachix-action@v12
continue-on-error: true
with:
name: enarx
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Build ${{ matrix.output }} Enarx package
run: nix build -L '.#${{ matrix.output }}'
- run: nix run --inputs-from . 'nixpkgs#coreutils' -- --coreutils-prog=ginstall -p ./result/main.wasm ${{ matrix.output }}.wasm
- uses: actions/upload-artifact@v3
with:
name: ${{ matrix.output }}.wasm
path: ${{ matrix.output }}.wasm
# TODO: Publish packages once
# - https://github.com/profianinc/drawbridge/issues/148
# - https://github.com/enarx/enarx/issues/2048
# are done
#- run: enarx package publish "examples/${{ matrix.output }}:$(nix eval --raw '.#${{ matrix.output }}.version')" ./result