-
Notifications
You must be signed in to change notification settings - Fork 6
89 lines (83 loc) · 3.08 KB
/
release.yaml
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
84
85
86
87
88
89
name: Build and upload binaries to Release
on:
release:
types: [published]
env:
CARGO_INCREMENTAL: 0
jobs:
linux:
runs-on: ubuntu-latest
steps:
- name: Checkout git repository
uses: actions/checkout@master
- name: Make release build
run: >
docker run -v ${{github.workspace}}:/root
centos:centos7
/bin/bash -leuxc '
yum -y reinstall glibc-common;
yum -y install centos-release-scl-rh;
yum -y install https://dl.fedoraproject.org/pub/epel/epel-release-latest-7.noarch.rpm;
yum -y install devtoolset-10-binutils devtoolset-10-gcc cmake3;
alternatives --install /usr/local/bin/cmake cmake /usr/bin/cmake3 20 \
--slave /usr/local/bin/ctest ctest /usr/bin/ctest3 \
--slave /usr/local/bin/cpack cpack /usr/bin/cpack3 \
--slave /usr/local/bin/ccmake ccmake /usr/bin/ccmake3 \
--family cmake;
export PATH=$PATH:/opt/rh/devtoolset-10/root/bin;
curl https://sh.rustup.rs -sSf | sh -s -- -y --default-toolchain stable;
source $HOME/.cargo/env;
cd /root;
cargo build --release;
target/release/bamtofastq --help | grep -q Usage;
readelf -V target/release/bamtofastq;
ldd target/release/bamtofastq;
';
mkdir ${{runner.temp}}/artifacts;
cp -a target/release/bamtofastq ${{runner.temp}}/artifacts/bamtofastq_linux
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: bamtofastq
path: ${{runner.temp}}/artifacts
- name: Upload Linux
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{runner.temp}}/artifacts/bamtofastq_linux
asset_name: bamtofastq_linux
asset_content_type: application/octet-stream
macos:
runs-on: macos-10.15
env:
MACOSX_DEPLOYMENT_TARGET: 10.9
steps:
- name: Checkout git repository
uses: actions/checkout@master
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: 1.65.0
- name: Make release build
run: |
cargo build --release
target/release/bamtofastq --help | grep -q Usage
otool -L target/release/bamtofastq
mkdir ${{runner.temp}}/artifacts
cp -a target/release/bamtofastq ${{runner.temp}}/artifacts/bamtofastq_macos
- name: Upload build artifact
uses: actions/upload-artifact@v3
with:
name: bamtofastq
path: ${{runner.temp}}/artifacts
- name: Upload Mac
uses: actions/upload-release-asset@v1
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
upload_url: ${{ github.event.release.upload_url }}
asset_path: ${{runner.temp}}/artifacts/bamtofastq_macos
asset_name: bamtofastq_macos
asset_content_type: application/octet-stream