Skip to content

Commit 77662ee

Browse files
authored
Support and test opaque pointers (#528)
1 parent 83b5b74 commit 77662ee

20 files changed

+240
-399
lines changed

.github/download_build.sh

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
#!/bin/bash -e
2+
3+
# handle user inputs
4+
[ $# -ne 2 ] && { echo "Usage: $0 <build_name> <destination_file>" >&2; exit 1; }
5+
BUILD_NAME="$1"
6+
DEST_FILE="$2"
7+
[ -z "$BUILDKITE_TOKEN" ] && { echo "BUILDKITE_TOKEN not set." >&2; exit 1; }
8+
9+
API_BASE="https://api.buildkite.com/v2"
10+
ORG="julialang"
11+
PIPELINE="julia-master"
12+
13+
# find the first successful build on the master branch, and get its artifacts url
14+
ARTIFACTS_URL=$(curl -s -H "Authorization: Bearer $BUILDKITE_TOKEN" "$API_BASE/organizations/$ORG/pipelines/$PIPELINE/builds?branch=master" | \
15+
jq -r "first(.[] | .jobs[] | select(.step_key == \"$BUILD_NAME\" and .exit_status == 0) | .artifacts_url)")
16+
[ -z "$ARTIFACTS_URL" ] && { echo "No successful build found."; exit 1; }
17+
18+
# fetch the url of the first artifact
19+
ARTIFACT_URL=$(curl -s -H "Authorization: Bearer $BUILDKITE_TOKEN" "$ARTIFACTS_URL" | \
20+
jq -r '.[0].download_url')
21+
[ -z "$ARTIFACT_URL" ] && { echo "No artifact found."; exit 1; }
22+
23+
curl -s -L -H "Authorization: Bearer $BUILDKITE_TOKEN" -o "$DEST_FILE" "$ARTIFACT_URL"
24+
echo "Artifact downloaded as $DEST_FILE"

.github/workflows/ManifestUpdater.yml

Lines changed: 0 additions & 70 deletions
This file was deleted.

.github/workflows/ci.yml

Lines changed: 65 additions & 61 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,63 @@
11
name: CI
2+
23
on:
34
push:
45
branches:
56
- master
67
pull_request:
78
workflow_dispatch:
9+
10+
concurrency:
11+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
12+
cancel-in-progress: true
13+
814
jobs:
9-
# released versions, downloaded as binaries
1015
binary_test:
11-
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
16+
name: Julia ${{ matrix.version }} ${{ matrix.llvm_args }} - ${{ matrix.os }} - ${{ matrix.arch }}
1217
runs-on: ${{ matrix.os }}
1318
strategy:
1419
fail-fast: false
1520
matrix:
16-
version: ['1.8', '1.9', '1.10.0-beta2']
21+
version: ['1.8', '1.9', '1.10.0-beta3', 'nightly']
1722
os: [ubuntu-latest, macOS-latest, windows-latest]
1823
arch: [x64]
24+
llvm_args: ['']
25+
include:
26+
# starting with Julia 1.10, we can enable opaque pointers
27+
- version: '1.10.0-beta3'
28+
os: 'ubuntu-latest'
29+
arch: 'x64'
30+
llvm_args: '--opaque-pointers'
31+
- version: '1.10.0-beta3'
32+
os: 'macOS-latest'
33+
arch: 'x64'
34+
llvm_args: '--opaque-pointers'
35+
- version: '1.10.0-beta3'
36+
os: 'windows-latest'
37+
arch: 'x64'
38+
llvm_args: '--opaque-pointers'
39+
- version: 'nightly'
40+
os: 'ubuntu-latest'
41+
arch: 'x64'
42+
llvm_args: '--opaque-pointers'
43+
- version: 'nightly'
44+
os: 'macOS-latest'
45+
arch: 'x64'
46+
llvm_args: '--opaque-pointers'
47+
- version: 'nightly'
48+
os: 'windows-latest'
49+
arch: 'x64'
50+
llvm_args: '--opaque-pointers'
1951
steps:
2052
- uses: actions/checkout@v4
53+
54+
# install Julia
2155
- uses: julia-actions/setup-julia@v1
2256
with:
2357
version: ${{ matrix.version }}
2458
arch: ${{ matrix.arch }}
59+
60+
# set-up packages
2561
- uses: actions/cache@v3
2662
env:
2763
cache-name: cache-artifacts
@@ -33,76 +69,40 @@ jobs:
3369
${{ runner.os }}-test-
3470
${{ runner.os }}-
3571
- uses: julia-actions/julia-buildpkg@v1
36-
- uses: julia-actions/julia-runtest@v1
72+
73+
- name: Run tests
74+
uses: julia-actions/julia-runtest@v1
75+
env:
76+
JULIA_LLVM_ARGS: ${{ matrix.llvm_args }}
77+
78+
# post-process
3779
- uses: julia-actions/julia-processcoverage@v1
3880
- uses: codecov/codecov-action@v3
3981
with:
4082
file: lcov.info
4183

42-
# development versions, built from source (with assertions enabled)
43-
source_test:
44-
name: Julia ${{ matrix.branch }} - ${{ matrix.os }} - ${{ matrix.arch }}
84+
# fetching builds from Buildkite with assertions enabled
85+
assert_test:
86+
name: Julia-master ${{ matrix.build }} ${{ matrix.llvm_args }}
4587
runs-on: ${{ matrix.os }}
4688
strategy:
4789
fail-fast: false
4890
matrix:
49-
branch: ['release-1.8', 'release-1.9', 'release-1.10', 'master']
50-
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
51-
arch: [x64]
52-
exclude:
53-
# unknown segfault in LLVM
54-
- branch: 'release-1.10'
55-
os: 'windows-latest'
56-
arch: 'x64'
57-
# JuliaLang/julia#48081
58-
- branch: 'master'
59-
os: 'windows-latest'
60-
arch: 'x64'
61-
# hangs during compilation
62-
- branch: 'release-1.10'
63-
os: 'macOS-latest'
64-
arch: 'x64'
65-
- branch: 'master'
66-
os: 'macOS-latest'
67-
arch: 'x64'
68-
# compilation failure
69-
- branch: 'release-1.8'
70-
os: 'windows-latest'
71-
arch: 'x64'
91+
build: ['x86_64-linux-gnuassert']
92+
os: ['ubuntu-latest']
93+
arch: ['x64']
94+
llvm_args: ['', '--opaque-pointers']
7295
steps:
7396
- uses: actions/checkout@v4
74-
- uses: actions/checkout@v4
75-
with:
76-
repository: 'JuliaLang/julia'
77-
ref: ${{ matrix.branch }}
78-
path: 'julia'
7997

80-
- name: Install MSYS2
81-
uses: msys2/setup-msys2@v2
82-
with:
83-
path-type: inherit
84-
install: mingw-w64-x86_64-gcc cmake diffutils git m4 make patch tar p7zip curl python
85-
if: runner.os == 'Windows'
86-
87-
# compile Julia
88-
- name: Compile Julia
89-
run: |
90-
mv julia ../ # move julia checkout out of the way, for ReTestItems.jl
91-
sed -i.bak 's/exit 2/exit 0/g' ../julia/deps/tools/jlchecksum
92-
make -C ../julia -j $(nproc) FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 JULIA_PRECOMPILE=0
93-
echo $PWD/../julia/usr/bin >> $GITHUB_PATH
94-
if: runner.os != 'Windows'
95-
- name: Compile Julia (in msys2)
96-
shell: msys2 {0}
98+
- name: Download Julia
99+
env:
100+
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
97101
run: |
98-
mv julia ../ # move julia checkout out of the way, for ReTestItems.jl
99-
sed -i.bak 's/exit 2/exit 0/g' ../julia/deps/tools/jlchecksum
100-
# XXX: workaround for JuliaLang/julia#48081
101-
make -C ../julia/deps install-csl && \
102-
cp ${MINGW_PREFIX}/lib/libmsvcrt.a ../julia/usr/lib/libmsvcrt.a && \
103-
make -C ../julia -j $(nproc) FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 JULIA_PRECOMPILE=0
104-
echo $PWD/../julia/usr/bin >> $GITHUB_PATH
105-
if: runner.os == 'Windows'
102+
./.github/download_build.sh build_${{ matrix.build }} julia.tar.gz
103+
tar -xf julia.tar.gz -C ../
104+
rm julia.tar.gz
105+
echo $PWD/../julia-*/bin >> $GITHUB_PATH
106106
107107
# set-up packages
108108
- uses: actions/cache@v3
@@ -117,8 +117,12 @@ jobs:
117117
${{ runner.os }}-
118118
- uses: julia-actions/julia-buildpkg@v1
119119

120-
- uses: julia-actions/julia-runtest@v1
120+
- name: Run tests
121+
uses: julia-actions/julia-runtest@v1
122+
env:
123+
JULIA_LLVM_ARGS: ${{ matrix.llvm_args }}
121124

125+
# post-process
122126
- uses: julia-actions/julia-processcoverage@v1
123127
- uses: codecov/codecov-action@v3
124128
with:

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
test/Manifest.toml
2+
Manifest.toml

0 commit comments

Comments
 (0)