Skip to content

Commit

Permalink
fix: We may not need to use use_absolute any more
Browse files Browse the repository at this point in the history
  • Loading branch information
sindre-nistad committed Jan 23, 2025
1 parent 4eabb20 commit 2fc140b
Show file tree
Hide file tree
Showing 3 changed files with 84 additions and 88 deletions.
166 changes: 83 additions & 83 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,84 +3,84 @@ name: Build, Test, and deploy
on: [push]

jobs:
prepare-arm-performance-libraries:
runs-on: ${{ matrix.os }}
name: Download and prepare ARM Performance Libraries
strategy:
matrix:
armpl:
- "23.10"
os:
- macos-14
steps:
- uses: actions/checkout@v4
name: Checkout repository

- name: Restore cached ARM sources and libraries
id: cache-armpl
uses: actions/cache@v3
with:
lookup-only: true
path: sources/arm-performance-libraries/${{ matrix.armpl }}/${{ runner.os }}
key: armpl-${{ matrix.armpl }}-${{ matrix.os }}-${{ hashFiles('bin/fetch-ArmPL.sh') }}

- name: Download ARM Performance Libraries and extract relevant headers and libraries
if: steps.cache-armpl.outputs.cache-hit != 'true'
run: |
./bin/fetch-ArmPL.sh ${{ matrix.armpl }}
- name: Store headers and libraries
if: steps.cache-armpl.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: armpl-${{ matrix.armpl }}-${{ matrix.os }}
path: sources/arm-performance-libraries/*
if-no-files-found: error

install-intel-oneapi:
runs-on: windows-2019
name: Install Intel oneAPI with MKL
env:
WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ae29263e-38b9-4d43-86c3-376d6e0668e7/intel-oneapi-base-toolkit-2025.0.1.47_offline.exe
WINDOWS_COMPONENTS: intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel:intel.oneapi.win.dpl
CACHE_NUMBER: 1

defaults:
run:
shell: bash
steps:
- uses: actions/checkout@v4

- name: cache install
id: cache-install
uses: actions/cache@v4
with:
lookup-only: true # We don't use oneAPI here, rather it is used in the build step
path: |
C:\Program Files (x86)\Intel\oneAPI\
key: intel-openapi-install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_BASEKIT_URL }}-${{ env.WINDOWS_COMPONENTS }}-compiler-${{ hashFiles('**/bin/cache_exclude_windows.sh') }}

- name: install
if: steps.cache-install.outputs.cache-hit != 'true'
timeout-minutes: 10
run: bin/install-intel-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_COMPONENTS

- name: exclude unused files from cache
if: steps.cache-install.outputs.cache-hit != 'true'
shell: bash
run: bin/cache_exclude_windows.sh

# Delete the following if you don't want to save install logs
- name: Saving install logs
if: steps.cache-install.outputs.cache-hit != 'true'
uses: actions/upload-artifact@v4
with:
name: InstallLogs_${{ github.job }}
path: |
extract.log
bootstrapper*
installer*
retention-days: 7
# prepare-arm-performance-libraries:
# runs-on: ${{ matrix.os }}
# name: Download and prepare ARM Performance Libraries
# strategy:
# matrix:
# armpl:
# - "23.10"
# os:
# - macos-14
# steps:
# - uses: actions/checkout@v4
# name: Checkout repository
#
# - name: Restore cached ARM sources and libraries
# id: cache-armpl
# uses: actions/cache@v3
# with:
# lookup-only: true
# path: sources/arm-performance-libraries/${{ matrix.armpl }}/${{ runner.os }}
# key: armpl-${{ matrix.armpl }}-${{ matrix.os }}-${{ hashFiles('bin/fetch-ArmPL.sh') }}
#
# - name: Download ARM Performance Libraries and extract relevant headers and libraries
# if: steps.cache-armpl.outputs.cache-hit != 'true'
# run: |
# ./bin/fetch-ArmPL.sh ${{ matrix.armpl }}
#
# - name: Store headers and libraries
# if: steps.cache-armpl.outputs.cache-hit != 'true'
# uses: actions/upload-artifact@v4
# with:
# name: armpl-${{ matrix.armpl }}-${{ matrix.os }}
# path: sources/arm-performance-libraries/*
# if-no-files-found: error
#
# install-intel-oneapi:
# runs-on: windows-2019
# name: Install Intel oneAPI with MKL
# env:
# WINDOWS_BASEKIT_URL: https://registrationcenter-download.intel.com/akdlm/IRC_NAS/ae29263e-38b9-4d43-86c3-376d6e0668e7/intel-oneapi-base-toolkit-2025.0.1.47_offline.exe
# WINDOWS_COMPONENTS: intel.oneapi.win.mkl.devel:intel.oneapi.win.tbb.devel:intel.oneapi.win.dpl
# CACHE_NUMBER: 1
#
# defaults:
# run:
# shell: bash
# steps:
# - uses: actions/checkout@v4
#
# - name: cache install
# id: cache-install
# uses: actions/cache@v4
# with:
# lookup-only: true # We don't use oneAPI here, rather it is used in the build step
# path: |
# C:\Program Files (x86)\Intel\oneAPI\
# key: intel-openapi-install-${{ env.CACHE_NUMBER }}-${{ env.WINDOWS_BASEKIT_URL }}-${{ env.WINDOWS_COMPONENTS }}-compiler-${{ hashFiles('**/bin/cache_exclude_windows.sh') }}
#
# - name: install
# if: steps.cache-install.outputs.cache-hit != 'true'
# timeout-minutes: 10
# run: bin/install-intel-oneapi.bat $WINDOWS_BASEKIT_URL $WINDOWS_COMPONENTS
#
# - name: exclude unused files from cache
# if: steps.cache-install.outputs.cache-hit != 'true'
# shell: bash
# run: bin/cache_exclude_windows.sh
#
# # Delete the following if you don't want to save install logs
# - name: Saving install logs
# if: steps.cache-install.outputs.cache-hit != 'true'
# uses: actions/upload-artifact@v4
# with:
# name: InstallLogs_${{ github.job }}
# path: |
# extract.log
# bootstrapper*
# installer*
# retention-days: 7

build:
needs:
Expand All @@ -91,12 +91,12 @@ jobs:
strategy:
matrix:
os:
- ubuntu-20.04
- windows-2019
# Intel based
# - ubuntu-20.04
# - windows-2019
# # Intel based
- macos-13
# ARM based
- macos-14
# # ARM based
# - macos-14

steps:
- uses: actions/checkout@v4
Expand Down
2 changes: 0 additions & 2 deletions bin/find_dependants.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import argparse
import platform
import utils
import sysconfig

Expand All @@ -24,7 +23,6 @@ def run():
use_preprocessor=args.use_preprocessor,
include_directories=include_directories,
ignore=include_directories,
use_absolute=platform.system() == "Windows",
)))


Expand Down
4 changes: 1 addition & 3 deletions utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,6 @@ def collect_sources(
from_source_files: Iterable[str],
ignore: Optional[List[str]] = None,
source_dir: str = 'src',
use_absolute: bool = False,
use_preprocessor: bool = True,
include_directories: Optional[List[str]] = None,
) -> List[str]:
Expand Down Expand Up @@ -113,8 +112,7 @@ def _add_file(repl: str, file_regex):
try:
file = file.relative_to(root)
except ValueError:
if not use_absolute:
raise
pass
if use_preprocessor and is_relative_to(file, sysconfig.get_path("include")):
# We are not interested in these files, and some of them should not be used directly
# which we'll be doing here
Expand Down

0 comments on commit 2fc140b

Please sign in to comment.