Skip to content

Commit f3c4a76

Browse files
authored
Add build check and test (#5)
* Add build check and test * Fix zlib download link * Fix arma test
1 parent 8af9faf commit f3c4a76

File tree

5 files changed

+37
-2
lines changed

5 files changed

+37
-2
lines changed

.envrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# use .envrc to set shared environment
2+
3+
# use .envrc.local to set own local environment
4+
# source_env_if_exists .envrc.local
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Build checks
2+
run-name: ${{ github.actor }} Build test
3+
on: [push]
4+
jobs:
5+
Build-Test:
6+
runs-on: ubuntu-latest
7+
steps:
8+
- run: echo "The job was automatically triggered by a ${{ github.event_name }} event."
9+
- run: echo "This job is now running on a ${{ runner.os }} server."
10+
- run: echo "The name of your branch is ${{ github.ref }} and your repository is ${{ github.repository }}."
11+
- name: Check out repository code
12+
uses: actions/checkout@v4
13+
- run: echo "The ${{ github.repository }} repository has been cloned to the runner."
14+
- run: echo "The workflow is now ready to test your code on the runner."
15+
- name: List files in the repository
16+
run: |
17+
ls ${{ github.workspace }}
18+
- name: Mount bazel cache # Optional
19+
uses: actions/cache@v3
20+
with:
21+
path: "~/.cache/bazel"
22+
key: bazel
23+
- run: bazel build //...
24+
- run: bazel test //...
25+
- run: echo "This job's status is ${{ job.status }}."

.gitignore

+3-1
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,6 @@ bazel-out
44
bazel-testlogs
55
.vscode
66
genhtml
7-
*.log
7+
*.log
8+
*.out
9+
.envrc.local

WORKSPACE

+1-1
Original file line numberDiff line numberDiff line change
@@ -89,7 +89,7 @@ http_archive(
8989
build_file_content = _ALL_CONTENT ,
9090
strip_prefix = "zlib-1.3",
9191
urls = [
92-
"https://zlib.net/zlib-1.3.tar.gz"
92+
"https://github.com/madler/zlib/releases/download/v1.3/zlib-1.3.tar.gz"
9393
],
9494
sha256 = "FF0BA4C292013DBC27530B3A81E1F9A813CD39DE01CA5E0F8BF355702EFA593E",
9595
)

third_party/TestArmadillo.cc

+4
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2+
#define ARMA_USE_SUPERLU
3+
#define ARMA_USE_LAPACK
4+
#define ARMA_DONT_USE_WRAPPER
15
#include <iostream>
26
#include <armadillo>
37

0 commit comments

Comments
 (0)