Skip to content

Commit 8287664

Browse files
committed
Move env vars to common.sh
1 parent 1dce984 commit 8287664

File tree

7 files changed

+46
-20
lines changed

7 files changed

+46
-20
lines changed

.github/scripts/ci-style.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,18 @@
1-
project_root=$(dirname "$0")/../..
21
set -xe
32

3+
. $(dirname "$0")/common.sh
4+
45
export RUSTFLAGS="-D warnings"
56

6-
pushd $project_root/mmtk
7+
pushd $BINDGING_PATH/mmtk
78
cargo clippy
89
cargo clippy --release
910

1011
cargo fmt -- --check
1112
popd
1213

13-
find $project_root/openjdk \
14-
$project_root/mmtk \
14+
find $BINDGING_PATH/openjdk \
15+
$BINDGING_PATH/mmtk \
1516
-name '*.hpp' \
1617
-o -name '*.cpp' \
1718
-o -name '*.rs' \

.github/scripts/ci-test-assertions.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set -xe
22

3+
. $(dirname "$0")/common.sh
4+
35
unset JAVA_TOOL_OPTIONS
46

57
# To OpenJDK folder

.github/scripts/ci-test-global-alloc-bit.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set -xe
22

3+
. $(dirname "$0")/common.sh
4+
35
unset JAVA_TOOL_OPTIONS
46

57
# To OpenJDK folder

.github/scripts/ci-test-normal.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
set -xe
22

3+
. $(dirname "$0")/common.sh
4+
35
unset JAVA_TOOL_OPTIONS
46

57
# To OpenJDK folder

.github/scripts/common.sh

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,5 @@
1+
BINDING_PATH=$(realpath $(dirname "$0"))/../../
2+
OPENJDK_PATH=$BINDING_PATH/repos/openjdk
3+
DACAPO_PATH=$OPENJDK_PATH/dacapo
4+
15
RUSTUP_TOOLCHAIN=`cat $BINDING_PATH/mmtk/rust-toolchain`

.github/workflows/ci-assert.yml

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
name: Dacapo Tests
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
test-assertions:
10+
runs-on: ubuntu-18.04
11+
steps:
12+
- uses: actions/checkout@v2
13+
- name: Setup Environments
14+
run: |
15+
./.github/scripts/ci-checkout.sh
16+
./.github/scripts/ci-setup.sh
17+
18+
# Run the tests with assertions
19+
- name: Dacapo Test (with extreme_assertions)
20+
run: ./.github/scripts/ci-test-assertions.sh

.github/workflows/ci.yml

Lines changed: 11 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -9,24 +9,19 @@ jobs:
99
test:
1010
runs-on: ubuntu-18.04
1111
steps:
12-
- name: Setup env vars for paths
13-
run: |
14-
echo "OPENJDK_PATH=$PWD/openjdk" >> $GITHUB_ENV
15-
echo "BINDING_PATH=$PWD/mmtk-openjdk" >> $GITHUB_ENV
16-
echo "DACAPO_PATH=$PWD/dacapo" >> $GITHUB_ENV
1712
- uses: actions/checkout@v2
18-
with:
19-
path: ${{ env.BINDING_PATH }}
2013
- name: Setup environments
21-
working-directory: ${{ env.BINDING_PATH }}
22-
run: |
23-
.github/scripts/ci-checkout.sh
24-
.github/scripts/ci-setup.sh
25-
- name: Run Tests
26-
working-directory: ${{ env.BINDING_PATH }}
2714
run: |
28-
.github/scripts/ci-test.sh
15+
./.github/scripts/ci-checkout.sh
16+
./.github/scripts/ci-setup.sh
17+
18+
# Run the tests
19+
- name: Dacapo Tests
20+
run: ./.github/scripts/ci-test-normal.sh
21+
- name: DaCapo Tests for Global Allocation Bit
22+
run: ./.github/scripts/ci-test-global-alloc-bit.sh
23+
24+
# Style check
2925
- name: Style check
30-
working-directory: ${{ env.BINDING_PATH }}
3126
run: |
32-
.github/scripts/ci-style.sh
27+
./.github/scripts/ci-style.sh

0 commit comments

Comments
 (0)