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

DRAFT: Combine aarch64 testing with atomics fix #530

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
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
10 changes: 7 additions & 3 deletions .github/actions/do_build_ock/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,7 @@ runs:
shell: bash
run:
cmake -GNinja
-B${{ inputs.build_dir }}
-DCMAKE_C_COMPILER_LAUNCHER=sccache
-DCMAKE_CXX_COMPILER_LAUNCHER=sccache
-B${{ inputs.build_dir }}
-DCA_MUX_TARGETS_TO_ENABLE=${{ inputs.mux_targets_enable }}
-DCA_ENABLE_API=${{ inputs.enable_api }}
-DCA_LLVM_INSTALL_DIR=${{ inputs.llvm_install_dir }}
Expand All @@ -110,6 +108,12 @@ runs:
-DCMAKE_INSTALL_PREFIX=${{ inputs.install_dir }}
${{ inputs.extra_flags }}
.

# Removed for aarch64
# -DCMAKE_C_COMPILER_LAUNCHER=sccache
# -DCMAKE_CXX_COMPILER_LAUNCHER=sccache


- name: build_ock
shell: bash
run:
Expand Down
15 changes: 8 additions & 7 deletions .github/actions/setup_ubuntu_build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,11 +39,12 @@ runs:
fail-on-cache-miss: true

# note the PR testing usage should set 'save' to false, to avoid PR testing creating new caches on a branch
- name: Setup sccache
uses: hendrikmuhs/[email protected]
with:
max-size: 200M
key: sccache-build
variant: sccache
save: ${{ inputs.save }}
# - name: Setup sccache
# if: ${{ inputs.arch}} == 'x86_64'
# uses: hendrikmuhs/[email protected]
# with:
# max-size: 200M
# key: sccache-build
# variant: sccache
# save: ${{ inputs.save }}

54 changes: 54 additions & 0 deletions .github/workflows/build_ock_aarch64.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
# Simple workflow for testing aarch64 ock
name: Run aarch64 ock tests for PR testing
on:
# For testing purposes do on a pull request if this file changes
pull_request:
paths:
- '.github/workflows/build_ock_aarch64.yml'
- '.github/actions/setup_ubuntu_build/**'

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

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

jobs:

# build and run host aarch64, execute UnitCL and lit tests and build and run offline
run_host_aarch64:
runs-on: cp-graviton
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: add to path
run:
echo "PATH=$PATH:/home/ubuntu/.local/bin" >> $GITHUB_ENV

- name: echo PATH
run:
echo PATH=$PATH
# installs tools, ninja, installs llvm and sets up sccahe
- name: setup-ubuntu
uses: ./.github/actions/setup_ubuntu_build
with:
llvm_version: 18
llvm_build_type: RelAssert
arch: aarch64

# These need to match the configurations of build_pr_cache to use the cache effectively
- name: build host x86_64 online release
uses: ./.github/actions/do_build_ock
with:
build_type: ReleaseAssert

- name: run just online lit
run:
ninja -C build check-ock-all-lit

- name: run host online check
run:
ninja -C build check-ock-UnitCL


2 changes: 1 addition & 1 deletion source/cl/test/UnitCL/source/C11Atomics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2365,7 +2365,7 @@ class WeakGlobalSingle : public C11AtomicTestBase {
return desired_values[index];
};
kts::Reference1D<cl_int> bool_output_reference =
[success_index, weak_exchange_failed](size_t index) {
[success_index, &weak_exchange_failed](size_t index) {
return index == success_index && !weak_exchange_failed;
};

Expand Down
Loading