Skip to content

Commit

Permalink
Fix unchecked merge train wreck (celeritas-project#1021)
Browse files Browse the repository at this point in the history
* REVERTME: disable other builds

* Source profile in examples

* Add a metabuild for pulls and a workflow

* Fix stable_decay_constant

* Update OpaqueId struct since ParticleRecord no longer exists

* Update workflow names

* Address feedback
  • Loading branch information
sethrj committed Nov 20, 2023
1 parent 88237d1 commit ff8620c
Show file tree
Hide file tree
Showing 5 changed files with 61 additions and 23 deletions.
30 changes: 9 additions & 21 deletions .github/workflows/ci.yml → .github/workflows/build-full.yml
Original file line number Diff line number Diff line change
@@ -1,28 +1,17 @@
name: ci

name: build-full
on:
push:
branches:
- develop
- backports/**
pull_request:
branches:
- develop
- backports/**
paths-ignore:
- '**.rst'
- '**.md'
- 'scripts/dev'
merge_group:
types: [checks_requested]
workflow_dispatch:
workflow_call:

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

jobs:
build:
name: CI
# TODO: this currently includes non-GPU builds as well
# and won't actually run on device
gpu:
name: gpu
strategy:
matrix:
special: [null]
Expand Down Expand Up @@ -59,8 +48,6 @@ jobs:
image: 'ubuntu-cuda'
env:
ASAN_OPTIONS: "detect_leaks=0"
# CCACHE_DIR: "${{github.workspace}}/.ccache"
# CCACHE_MAXSIZE: "10G"
CELER_TEST_STRICT: 1
CELER_DISABLE_DEVICE: 1 # IMPORTANT
CMAKE_PRESET: >-
Expand Down Expand Up @@ -125,9 +112,10 @@ jobs:
&& !(matrix.geometry == 'vecgeom' && matrix.buildtype != 'ndebug')
}}
run: |
. /etc/profile
if [ "${{matrix.geometry}}" = "vecgeom" ]; then
# TODO: vecgeom is loosey goosey about symbols whereas Ubuntu is strict
export LDFLAGS=-Wl,--no-as-needed
export LDFLAGS=-Wl,--no-as-needed ${LDFLAGS}
fi
./scripts/ci/test-examples.sh
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: pr

on:
pull_request:
branches:
- develop
- backports/**
paths-ignore:
- '**.rst'
- '**.md'
- 'scripts/dev'
merge_group:
types: [checks_requested]

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

jobs:
build:
uses: ./.github/workflows/build-full.yml

# Specifying a dependent job allows us to select a single "requires" check
all:
needs: [ build ]
runs-on: ubuntu-latest
steps:
- name: Success
run: "true"

# vim: set nowrap tw=100:
18 changes: 18 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
name: push

on:
push:
branches:
- develop
- backports/**

concurrency:
group: ${{github.ref}}-${{github.run_number}}-${{github.workflow}}
cancel-in-progress: true

jobs:
build:
uses: ./.github/workflows/build-full.yml
# TODO: build and push documentation

# vim: set nowrap tw=100:
3 changes: 2 additions & 1 deletion example/minimal/minimal.cc
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
//! \file example/minimal/minimal.cc
//---------------------------------------------------------------------------//
#include <memory>
#include <celeritas/Constants.hh>
#include <celeritas/phys/PDGNumber.hh>
#include <celeritas/phys/ParticleParams.hh>
#include <corecel/io/Logger.hh>
Expand All @@ -26,7 +27,7 @@ namespace
std::shared_ptr<ParticleParams> make_particles()
{
constexpr auto zero = celeritas::zero_quantity();
constexpr auto stable = celeritas::ParticleRecord::stable_decay_constant();
constexpr auto stable = celeritas::constants::stable_decay_constant;

ParticleParams::Input defs;
defs.push_back({"electron",
Expand Down
2 changes: 1 addition & 1 deletion src/celeritas/Types.hh
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ using MaterialId = OpaqueId<struct MaterialRecord>;
using ModelId = OpaqueId<class Model>;

//! Opaque index to ParticleRecord in a vector: represents a particle type
using ParticleId = OpaqueId<struct ParticleRecord>;
using ParticleId = OpaqueId<struct Particle_>;

//! Opaque index of physics process
using ProcessId = OpaqueId<class Process>;
Expand Down

0 comments on commit ff8620c

Please sign in to comment.