Skip to content

Commit c1286aa

Browse files
udesoustephenrkellqinsoonLuis Eduardo de Souza Amorim
committed
Updating dev branches with latest version from upstream (mmtk#226)
Updating `dev`. Merge with mmtk/julia#85. --------- Co-authored-by: Stephen Kell <[email protected]> Co-authored-by: Yi Lin <[email protected]> Co-authored-by: Luis Eduardo de Souza Amorim <[email protected]>
1 parent 48bbdd6 commit c1286aa

32 files changed

+3669
-331
lines changed

.github/mergify.yml

+11
Original file line numberDiff line numberDiff line change
@@ -21,3 +21,14 @@ pull_request_rules:
2121
assignees:
2222
- "{{ author }}"
2323
label_conflicts: backport-conflicts
24+
- name: backport patches to dev
25+
conditions:
26+
- base=master
27+
- label=backport-dev
28+
actions:
29+
backport:
30+
branches:
31+
- dev
32+
assignees:
33+
- "{{ author }}"
34+
label_conflicts: backport-conflicts

.github/scripts/Make.user

+2-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
FORCE_ASSERTIONS=1
2-
LLVM_ASSERTIONS=1
2+
LLVM_ASSERTIONS=1
3+
USE_BINARYBUILDER_MMTK_JULIA=0

.github/scripts/ci-build.sh

+8-5
Original file line numberDiff line numberDiff line change
@@ -27,15 +27,18 @@ fi
2727
plan_feature=${plan,,}
2828
moving_feature=${is_moving,,}
2929

30-
cd $MMTK_JULIA_DIR/mmtk
31-
cargo build --features $plan_feature,$moving_feature $build_args
30+
if [ "$is_moving" == "moving" ]; then
31+
MOVING=1
32+
else
33+
MOVING=0
34+
fi
3235

3336
cd $JULIA_PATH
34-
3537
# Clean first
3638
make cleanall
37-
# Build
39+
# This will build the binding in MMTK_JULIA_DIR (defined in common.sh), and link it
40+
# when building Julia, instead of using the set version defined in Julia itself
3841
cp $BINDING_PATH/.github/scripts/Make.user $JULIA_PATH/
39-
MMTK_PLAN=$plan MMTK_BUILD=$build_type make
42+
MMTK_MOVING=$MOVING MMTK_PLAN=$plan MMTK_BUILD=$build_type make
4043
# Run hello world
4144
$JULIA_PATH/julia $HELLO_WORLD_JL

.github/scripts/ci-checkout.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,10 @@ set -ex
22

33
. $(dirname "$0")/common.sh
44

5-
JULIA_URL=`cargo read-manifest --manifest-path=$BINDING_PATH/mmtk/Cargo.toml | python -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["julia"]["julia_repo"])'`
6-
JULIA_VERSION=`cargo read-manifest --manifest-path=$BINDING_PATH/mmtk/Cargo.toml | python -c 'import json,sys; print(json.load(sys.stdin)["metadata"]["julia"]["julia_version"])'`
5+
# We may later allow setting up a specific version of Julia using comments
6+
# in the PR, but for now we just use the latest master from JuliaLang
7+
JULIA_URL=https://github.com/$1.git
8+
JULIA_VERSION=$2
79

810
rm -rf $JULIA_PATH
911
git clone $JULIA_URL $JULIA_PATH

.github/scripts/ci-ffi.sh

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
set -ex
2+
3+
. $(dirname "$0")/common.sh
4+
5+
pushd $MMTK_JULIA_DIR
6+
7+
make regen-bindgen-ffi
8+
9+
popd
10+

.github/scripts/ci-style.sh

+2-5
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,8 @@ export RUSTFLAGS="-D warnings"
66

77
pushd $BINDING_PATH/mmtk
88

9-
# Currently we have many warnings from clippy, and we have PRs sitting there to be merged.
10-
# I am concerned that enabling this will cause merge conflicts everywhere.
11-
# However, we should enable this as soon as we can.
12-
# cargo clippy
13-
# cargo clippy --release
9+
cargo clippy
10+
cargo clippy --release
1411

1512
cargo fmt -- --check
1613
popd

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,4 +13,4 @@ num_workers=2
1313
export JULIA_TEST_MAXRSS_MB=$((total_mem_restricted/ num_workers))
1414

1515
echo "-> Run single threaded"
16-
ci_run_jl_test "LinearAlgebra" 2
16+
ci_run_jl_test "LinearAlgebra" 2

.github/scripts/ci-test-gc-core.sh

-2
Original file line numberDiff line numberDiff line change
@@ -27,5 +27,3 @@ do
2727
ci_run_jl_test $test
2828
fi
2929
done
30-
31-

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

+2
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ declare -a tests_to_skip=(
2222
"SparseArrays"
2323
# Running LinearAlgebra in a separate job
2424
"LinearAlgebra"
25+
# Skipping distributed tests because of https://github.com/JuliaLang/Distributed.jl/issues/132
26+
"Distributed"
2527
)
2628
# These tests need multiple workers.
2729
declare -a tests_with_multi_workers=(

.github/scripts/ci-test.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -15,4 +15,4 @@ cd $cur
1515

1616
# Use release build to run tests
1717
cd $cur
18-
./ci-test-gc-core.sh
18+
./ci-test-gc-core.sh

.github/workflows/binding-tests.yml

+73-5
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,12 @@ on:
99
moving:
1010
required: true
1111
type: string
12+
julia_repo:
13+
required: true
14+
type: string
15+
julia_ref:
16+
required: true
17+
type: string
1218

1319
jobs:
1420
build-debug:
@@ -17,26 +23,76 @@ jobs:
1723
- uses: actions/checkout@v2
1824
- name: Setup environments
1925
run: |
20-
./.github/scripts/ci-checkout.sh
26+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
2127
./.github/scripts/ci-setup.sh
2228
# removing these as they cause a conflict within bindgen
23-
sudo rm -rf /usr/lib/llvm-14
29+
sudo rm -rf /usr/lib/llvm-14
30+
sudo rm -rf /usr/lib/llvm-13
31+
- name: Build Julia (Debug)
32+
run: |
33+
./.github/scripts/ci-build.sh debug ${{ inputs.gc_plan }} ${{ inputs.moving }}
34+
- name: Print Julia version info
35+
run: |
36+
JULIA_PATH=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia/vm/julia
37+
$JULIA_PATH/julia --project=. -e "using InteractiveUtils; versioninfo()"
38+
- name: Style check
39+
run: |
40+
./.github/scripts/ci-style.sh
41+
42+
build-debug-regen-ffi:
43+
runs-on: ubuntu-22.04
44+
steps:
45+
- uses: actions/checkout@v2
46+
- name: Setup environments
47+
run: |
48+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
49+
./.github/scripts/ci-setup.sh
50+
# removing these as they cause a conflict within bindgen
51+
sudo rm -rf /usr/lib/llvm-14
2452
sudo rm -rf /usr/lib/llvm-13
53+
- name: Check FFI bindings
54+
run: |
55+
./.github/scripts/ci-ffi.sh
2556
- name: Build Julia (Debug)
2657
run: |
2758
./.github/scripts/ci-build.sh debug ${{ inputs.gc_plan }} ${{ inputs.moving }}
59+
- name: Print Julia version info
60+
run: |
61+
JULIA_PATH=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia/vm/julia
62+
$JULIA_PATH/julia --project=. -e "using InteractiveUtils; versioninfo()"
2863
- name: Style check
2964
run: |
3065
./.github/scripts/ci-style.sh
3166
67+
check-ffi:
68+
runs-on: ubuntu-22.04
69+
steps:
70+
- uses: actions/checkout@v2
71+
- name: Setup environments
72+
run: |
73+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
74+
./.github/scripts/ci-setup.sh
75+
# removing these as they cause a conflict within bindgen
76+
sudo rm -rf /usr/lib/llvm-14
77+
sudo rm -rf /usr/lib/llvm-13
78+
- name: Regenerate FFI bindings
79+
run: |
80+
./.github/scripts/ci-ffi.sh
81+
- run: |
82+
MMTK_JULIA_DIR=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia
83+
if ! git diff --exit-code $MMTK_JULIA_DIR/mmtk/src/julia_types.rs; then
84+
echo "Rust FFI bindings in \`julia_types.rs\` are outdated. Run \`make regen-bindgen-ffi\` from the mmtk-julia directory and make sure to include the updated file in the pull request."
85+
exit 1
86+
fi
87+
3288
build-test-other:
3389
runs-on: ubuntu-22.04
3490
timeout-minutes: 360
3591
steps:
3692
- uses: actions/checkout@v2
3793
- name: Setup environments
3894
run: |
39-
./.github/scripts/ci-checkout.sh
95+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
4096
./.github/scripts/ci-setup.sh
4197
# removing these as they cause a conflict within bindgen
4298
sudo rm -rf /usr/lib/llvm-14
@@ -47,6 +103,10 @@ jobs:
47103
- name: Build Julia (Release)
48104
run: |
49105
./.github/scripts/ci-build.sh release ${{ inputs.gc_plan }} ${{ inputs.moving }}
106+
- name: Print Julia version info
107+
run: |
108+
JULIA_PATH=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia/vm/julia
109+
$JULIA_PATH/julia --project=. -e "using InteractiveUtils; versioninfo()"
50110
- name: Test Julia
51111
run: |
52112
./.github/scripts/ci-test-other.sh
@@ -58,7 +118,7 @@ jobs:
58118
- uses: actions/checkout@v2
59119
- name: Setup environments
60120
run: |
61-
./.github/scripts/ci-checkout.sh
121+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
62122
./.github/scripts/ci-setup.sh
63123
# removing these as they cause a conflict within bindgen
64124
sudo rm -rf /usr/lib/llvm-14
@@ -69,6 +129,10 @@ jobs:
69129
- name: Build Julia (Release)
70130
run: |
71131
./.github/scripts/ci-build.sh release ${{ inputs.gc_plan }} ${{ inputs.moving }}
132+
- name: Print Julia version info
133+
run: |
134+
JULIA_PATH=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia/vm/julia
135+
$JULIA_PATH/julia --project=. -e "using InteractiveUtils; versioninfo()"
72136
- name: Test Julia
73137
run: |
74138
./.github/scripts/ci-test-stdlib.sh
@@ -80,14 +144,18 @@ jobs:
80144
- uses: actions/checkout@v2
81145
- name: Setup environments
82146
run: |
83-
./.github/scripts/ci-checkout.sh
147+
./.github/scripts/ci-checkout.sh ${{ inputs.julia_repo }} ${{ inputs.julia_ref }}
84148
./.github/scripts/ci-setup.sh
85149
# removing these as they cause a conflict within bindgen
86150
sudo rm -rf /usr/lib/llvm-14
87151
sudo rm -rf /usr/lib/llvm-13
88152
- name: Build Julia (Release)
89153
run: |
90154
./.github/scripts/ci-build.sh release ${{ inputs.gc_plan }} ${{ inputs.moving }}
155+
- name: Print Julia version info
156+
run: |
157+
JULIA_PATH=$(realpath $(dirname "$0"))/../mmtk-julia/mmtk-julia/vm/julia
158+
$JULIA_PATH/julia --project=. -e "using InteractiveUtils; versioninfo()"
91159
- name: Test Julia
92160
run: |
93161
./.github/scripts/ci-test-LinearAlgebra.sh

.github/workflows/ci.yml

+24-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,28 @@ concurrency:
1414
cancel-in-progress: true
1515

1616
jobs:
17+
julia-version:
18+
runs-on: ubuntu-latest
19+
env:
20+
JULIA_REPO_DEFAULT: JuliaLang/julia
21+
JULIA_REF_DEFAULT: master
22+
outputs:
23+
julia_repo: ${{ steps.print.outputs.julia_repo }}
24+
julia_ref: ${{ steps.print.outputs.julia_ref }}
25+
steps:
26+
- name: Check Julia revisions
27+
uses: qinsoon/[email protected]
28+
with:
29+
pull_request: ${{ github.event.pull_request.number }}
30+
token: ${{ secrets.GITHUB_TOKEN }}
31+
default_env: 'JULIA_REPO=${{ env.JULIA_REPO_DEFAULT }},JULIA_REF=${{ env.JULIA_REF_DEFAULT }}'
32+
- id: print
33+
run: |
34+
echo "julia_repo=${{ env.JULIA_REPO }}" >> $GITHUB_OUTPUT
35+
echo "julia_ref=${{ env.JULIA_REF }}" >> $GITHUB_OUTPUT
36+
1737
binding-tests:
38+
needs: julia-version
1839
strategy:
1940
fail-fast: false
2041
matrix:
@@ -23,4 +44,6 @@ jobs:
2344
uses: ./.github/workflows/binding-tests.yml
2445
with:
2546
gc_plan: ${{ matrix.gc_plan }}
26-
moving: ${{ matrix.moving }}
47+
moving: ${{ matrix.moving }}
48+
julia_repo: ${{ needs.julia-version.outputs.julia_repo }}
49+
julia_ref: ${{ needs.julia-version.outputs.julia_ref }}

0 commit comments

Comments
 (0)