-
Notifications
You must be signed in to change notification settings - Fork 6
83 lines (83 loc) · 2.57 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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
name: Build Binary
on: [push, pull_request]
jobs:
build_windows:
name: Build Windows Binary
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- run: which cargo
- uses: msys2/setup-msys2@v2
with:
install: gcc make wget lzip m4
- name: Cache dependencies
id: cache-deps
uses: actions/cache@v2
with:
path: output
key: "${{ runner.os }}-deps"
- name: Build dependencies
if: steps.cache-deps.outputs.cache-hit != 'true'
shell: msys2 {0}
run: |
cd "$GITHUB_WORKSPACE"
bash build.sh
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
- shell: msys2 {0}
run: |
export PATH="/c/Rust/.cargo/bin/:$PATH"
export DELSUM_STATIC_LIBS=1
export DELSUM_NTL_LIB_PATH="$GITHUB_WORKSPACE\output\lib"
export DELSUM_NTL_INCLUDE="$GITHUB_WORKSPACE\output\include"
cargo build --release --target x86_64-pc-windows-gnu
cargo install cargo-strip
cargo strip --target x86_64-pc-windows-gnu
- uses: actions/upload-artifact@v2
with:
name: delsum_win
path: 'target\x86_64-pc-windows-gnu\release\delsum.exe'
#build_linux:
# name: Build Linux Binary
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - run: sudo apt install m4 lzip
# - name: Cache dependencies
# id: cache-deps
# uses: actions/cache@v2
# with:
# path: output
# key: "${{ runner.os }}-deps"
# - name: Build dependencies
# if: steps.cache-deps.outputs.cache-hit != 'true'
# run: |
# cd "$GITHUB_WORKSPACE"
# bash build.sh
# - uses: actions/cache@v2
# with:
# path: |
# ~/.cargo/registry
# ~/.cargo/git
# target
# key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
# - run: |
# export DELSUM_STATIC_LIBS=1
# export DELSUM_NTL_LIB_PATH="$GITHUB_WORKSPACE/output/lib"
# export DELSUM_NTL_INCLUDE="$GITHUB_WORKSPACE/output/include"
# cd delsum-lib
# cargo test
# cd ..
# cargo build --release
# - run: |
# cargo install cargo-strip
# cargo strip
# - uses: actions/upload-artifact@v2
# with:
# name: delsum-linux
# path: target/release/delsum