File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ name : Build and Release
2+
3+ on :
4+ push :
5+ branches :
6+ - main # Runs when pushing to main branch
7+ pull_request :
8+
9+ jobs :
10+ build :
11+ runs-on : ubuntu-latest
12+
13+ steps :
14+ - name : Checkout repository
15+ uses : actions/checkout@v4
16+
17+ - name : Install dependencies
18+ run : sudo apt update && sudo apt install -y build-essential libssl-dev libboost-all-dev
19+
20+ - name : Compile the project
21+ run : |
22+ make # Build the project
23+ g++ sdhash-src/sdhash.o sdhash-src/sdhash_threads.o libsdbf.a -o JC-sdhash -fopenmp \
24+ -L. -L./external/stage/lib -L/usr/lib/x86_64-linux-gnu \
25+ -lboost_system -lboost_filesystem -lboost_program_options -lc -lm -lcrypto -lboost_thread -lpthread
26+ mv JC-sdhash SDhash # Rename the output binary
27+ ls -lah # List files to verify the build
28+
29+
30+ - name : Create release artifact
31+ uses : actions/upload-artifact@v4
32+ with :
33+ name : SDhash-binary
34+ path : ./SDhash # Path to the renamed binary
35+
36+ release :
37+ needs : build
38+ runs-on : ubuntu-latest
39+
40+ steps :
41+ - name : Checkout repository
42+ uses : actions/checkout@v4
43+
44+ - name : Download artifact
45+ uses : actions/download-artifact@v4
46+ with :
47+ name : SDhash-binary
48+ path : .
49+
50+ - name : Create GitHub Release
51+ uses : softprops/action-gh-release@v2
52+ with :
53+ files : ./SDhash # Uploads the renamed binary
54+ env :
55+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments