Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support and test opaque pointers #528

Merged
merged 11 commits into from
Oct 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 24 additions & 0 deletions .github/download_build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
#!/bin/bash -e

# handle user inputs
[ $# -ne 2 ] && { echo "Usage: $0 <build_name> <destination_file>" >&2; exit 1; }
BUILD_NAME="$1"
DEST_FILE="$2"
[ -z "$BUILDKITE_TOKEN" ] && { echo "BUILDKITE_TOKEN not set." >&2; exit 1; }

API_BASE="https://api.buildkite.com/v2"
ORG="julialang"
PIPELINE="julia-master"

# find the first successful build on the master branch, and get its artifacts url
ARTIFACTS_URL=$(curl -s -H "Authorization: Bearer $BUILDKITE_TOKEN" "$API_BASE/organizations/$ORG/pipelines/$PIPELINE/builds?branch=master" | \
jq -r "first(.[] | .jobs[] | select(.step_key == \"$BUILD_NAME\" and .exit_status == 0) | .artifacts_url)")
[ -z "$ARTIFACTS_URL" ] && { echo "No successful build found."; exit 1; }

# fetch the url of the first artifact
ARTIFACT_URL=$(curl -s -H "Authorization: Bearer $BUILDKITE_TOKEN" "$ARTIFACTS_URL" | \
jq -r '.[0].download_url')
[ -z "$ARTIFACT_URL" ] && { echo "No artifact found."; exit 1; }

curl -s -L -H "Authorization: Bearer $BUILDKITE_TOKEN" -o "$DEST_FILE" "$ARTIFACT_URL"
echo "Artifact downloaded as $DEST_FILE"
70 changes: 0 additions & 70 deletions .github/workflows/ManifestUpdater.yml

This file was deleted.

126 changes: 65 additions & 61 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,27 +1,63 @@
name: CI

on:
push:
branches:
- master
pull_request:
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true

jobs:
# released versions, downloaded as binaries
binary_test:
name: Julia ${{ matrix.version }} - ${{ matrix.os }} - ${{ matrix.arch }}
name: Julia ${{ matrix.version }} ${{ matrix.llvm_args }} - ${{ matrix.os }} - ${{ matrix.arch }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
version: ['1.8', '1.9', '1.10.0-beta2']
version: ['1.8', '1.9', '1.10.0-beta3', 'nightly']
os: [ubuntu-latest, macOS-latest, windows-latest]
arch: [x64]
llvm_args: ['']
include:
# starting with Julia 1.10, we can enable opaque pointers
- version: '1.10.0-beta3'
os: 'ubuntu-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
- version: '1.10.0-beta3'
os: 'macOS-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
- version: '1.10.0-beta3'
os: 'windows-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
- version: 'nightly'
os: 'ubuntu-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
- version: 'nightly'
os: 'macOS-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
- version: 'nightly'
os: 'windows-latest'
arch: 'x64'
llvm_args: '--opaque-pointers'
steps:
- uses: actions/checkout@v4

# install Julia
- uses: julia-actions/setup-julia@v1
with:
version: ${{ matrix.version }}
arch: ${{ matrix.arch }}

# set-up packages
- uses: actions/cache@v3
env:
cache-name: cache-artifacts
Expand All @@ -33,76 +69,40 @@ jobs:
${{ runner.os }}-test-
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1
- uses: julia-actions/julia-runtest@v1

- name: Run tests
uses: julia-actions/julia-runtest@v1
env:
JULIA_LLVM_ARGS: ${{ matrix.llvm_args }}

# post-process
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
file: lcov.info

# development versions, built from source (with assertions enabled)
source_test:
name: Julia ${{ matrix.branch }} - ${{ matrix.os }} - ${{ matrix.arch }}
# fetching builds from Buildkite with assertions enabled
assert_test:
name: Julia-master ${{ matrix.build }} ${{ matrix.llvm_args }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
branch: ['release-1.8', 'release-1.9', 'release-1.10', 'master']
os: ['ubuntu-latest', 'macOS-latest', 'windows-latest']
arch: [x64]
exclude:
# unknown segfault in LLVM
- branch: 'release-1.10'
os: 'windows-latest'
arch: 'x64'
# JuliaLang/julia#48081
- branch: 'master'
os: 'windows-latest'
arch: 'x64'
# hangs during compilation
- branch: 'release-1.10'
os: 'macOS-latest'
arch: 'x64'
- branch: 'master'
os: 'macOS-latest'
arch: 'x64'
# compilation failure
- branch: 'release-1.8'
os: 'windows-latest'
arch: 'x64'
build: ['x86_64-linux-gnuassert']
os: ['ubuntu-latest']
arch: ['x64']
llvm_args: ['', '--opaque-pointers']
steps:
- uses: actions/checkout@v4
- uses: actions/checkout@v4
with:
repository: 'JuliaLang/julia'
ref: ${{ matrix.branch }}
path: 'julia'

- name: Install MSYS2
uses: msys2/setup-msys2@v2
with:
path-type: inherit
install: mingw-w64-x86_64-gcc cmake diffutils git m4 make patch tar p7zip curl python
if: runner.os == 'Windows'

# compile Julia
- name: Compile Julia
run: |
mv julia ../ # move julia checkout out of the way, for ReTestItems.jl
sed -i.bak 's/exit 2/exit 0/g' ../julia/deps/tools/jlchecksum
make -C ../julia -j $(nproc) FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 JULIA_PRECOMPILE=0
echo $PWD/../julia/usr/bin >> $GITHUB_PATH
if: runner.os != 'Windows'
- name: Compile Julia (in msys2)
shell: msys2 {0}
- name: Download Julia
env:
BUILDKITE_TOKEN: ${{ secrets.BUILDKITE_TOKEN }}
run: |
mv julia ../ # move julia checkout out of the way, for ReTestItems.jl
sed -i.bak 's/exit 2/exit 0/g' ../julia/deps/tools/jlchecksum
# XXX: workaround for JuliaLang/julia#48081
make -C ../julia/deps install-csl && \
cp ${MINGW_PREFIX}/lib/libmsvcrt.a ../julia/usr/lib/libmsvcrt.a && \
make -C ../julia -j $(nproc) FORCE_ASSERTIONS=1 LLVM_ASSERTIONS=1 JULIA_PRECOMPILE=0
echo $PWD/../julia/usr/bin >> $GITHUB_PATH
if: runner.os == 'Windows'
./.github/download_build.sh build_${{ matrix.build }} julia.tar.gz
tar -xf julia.tar.gz -C ../
rm julia.tar.gz
echo $PWD/../julia-*/bin >> $GITHUB_PATH

# set-up packages
- uses: actions/cache@v3
Expand All @@ -117,8 +117,12 @@ jobs:
${{ runner.os }}-
- uses: julia-actions/julia-buildpkg@v1

- uses: julia-actions/julia-runtest@v1
- name: Run tests
uses: julia-actions/julia-runtest@v1
env:
JULIA_LLVM_ARGS: ${{ matrix.llvm_args }}

# post-process
- uses: julia-actions/julia-processcoverage@v1
- uses: codecov/codecov-action@v3
with:
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
test/Manifest.toml
Manifest.toml
Loading