Skip to content

[WIP] CI: handle required workflows when skipped #21826

[WIP] CI: handle required workflows when skipped

[WIP] CI: handle required workflows when skipped #21826

Workflow file for this run

name: 🍏 macOS
on:
pull_request:
concurrency:
group: ${{ github.ref }}-${{ github.head_ref }}-macos
cancel-in-progress: true
jobs:
build_appleclang:
name: AppleClang
runs-on: macos-latest
steps:
- name: Run PR analysis
uses: ./.github/workflows/pr-analysis.yml
id: pr_analysis
- name: Checkout code
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}

Check failure on line 19 in .github/workflows/macos.yml

View workflow run for this annotation

GitHub Actions / 🍏 macOS

Invalid workflow file

The workflow is not valid. .github/workflows/macos.yml (Line: 19, Col: 13): Unexpected symbol: '"false"'. Located at position 79 within expression: github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" .github/workflows/macos.yml (Line: 22, Col: 13): Unexpected symbol: '"false"'. Located at position 79 within expression: github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false"
uses: actions/checkout@v4
- name: Install Python
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
uses: actions/setup-python@v5
with:
python-version: '3.x'
- name: Install brew dependencies
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
run: |
set +e
brew unlink gcc
brew update
brew upgrade || true
brew install ccache
brew install fftw
brew install libomp
brew link --overwrite --force libomp
brew install ninja
brew install open-mpi
brew install pkg-config
set -e
brew tap openpmd/openpmd
brew install openpmd-api
- name: Install pip dependencies
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
run: |
python3 -m pip install --upgrade pip
python3 -m pip install --upgrade build packaging setuptools wheel
python3 -m pip install --upgrade mpi4py
python3 -m pip install --upgrade -r Regression/requirements.txt
- name: CCache Cache
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
uses: actions/cache@v4
with:
path: ~/Library/Caches/ccache
key: ccache-${{ github.workflow }}-${{ github.job }}-git-${{ github.sha }}
restore-keys: |
ccache-${{ github.workflow }}-${{ github.job }}-git-
- name: Build WarpX
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
run: |
export CCACHE_COMPRESS=1
export CCACHE_COMPRESSLEVEL=10
export CCACHE_MAXSIZE=100M
export CCACHE_SLOPPINESS=time_macros
ccache -z
export CXXFLAGS="-Werror -Wno-error=pass-failed"
cmake -S . -B build_dp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=OFF \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF
cmake --build build_dp -j 3
cmake -S . -B build_sp \
-DCMAKE_VERBOSE_MAKEFILE=ON \
-DWarpX_EB=OFF \
-DWarpX_PYTHON=ON \
-DWarpX_OPENPMD=ON \
-DWarpX_openpmd_internal=OFF \
-DWarpX_PRECISION=SINGLE
cmake --build build_sp -j 3
cmake --build build_sp --target pip_install
du -hs ~/Library/Caches/ccache
ccache -s
- name: Run pywarpx
if: ${{ github.event.pull_request.draft == false && steps.pr_analysis.outputs.skip == "false" }}
run: |
export OMP_NUM_THREADS=1
mpirun -n 2 Examples/Physics_applications/laser_acceleration/inputs_test_3d_laser_acceleration_picmi.py