初始化内容
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
name: Lint GitHub Actions workflows
|
||||
on: [push, pull_request]
|
||||
|
||||
jobs:
|
||||
actionlint:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
- name: Check workflow files
|
||||
run: |
|
||||
echo "::add-matcher::.github/actionlint-matcher.json"
|
||||
bash <(curl https://raw.githubusercontent.com/rhysd/actionlint/main/scripts/download-actionlint.bash)
|
||||
./actionlint -color
|
||||
shell: bash
|
||||
Vendored
+1047
File diff suppressed because it is too large
Load Diff
+39
@@ -0,0 +1,39 @@
|
||||
name: CMake
|
||||
|
||||
on:
|
||||
push:
|
||||
branches-ignore:
|
||||
- 'ci/**'
|
||||
- '!ci/gha**'
|
||||
- 'dependabot/**'
|
||||
pull_request:
|
||||
branches:
|
||||
- 'master'
|
||||
|
||||
concurrency:
|
||||
group: cmake-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
test-install:
|
||||
name: CMake - ${{ matrix.os }}
|
||||
runs-on: ${{ matrix.os }}
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
os: [macos-latest, ubuntu-latest, ubuntu-24.04-arm, windows-latest, windows-11-arm]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
|
||||
- uses: ilammy/msvc-dev-cmd@v1
|
||||
|
||||
- name: Configure SIMDe
|
||||
run: cmake -G Ninja -S . -B build
|
||||
|
||||
- name: Build SIMDe
|
||||
run: cmake --build build
|
||||
|
||||
- name: Test SIMDe Package
|
||||
run: ctest --test-dir build --output-on-failure --verbose
|
||||
|
||||
@@ -0,0 +1,43 @@
|
||||
name: "CodeQL"
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
pull_request:
|
||||
# The branches below must be a subset of the branches above
|
||||
branches: [master]
|
||||
schedule:
|
||||
- cron: '0 8 * * 3'
|
||||
|
||||
jobs:
|
||||
analyze:
|
||||
name: Analyze
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
# Override automatic language detection by changing the below list
|
||||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python']
|
||||
language: ['c-cpp']
|
||||
# Learn more...
|
||||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection
|
||||
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
|
||||
# Initializes the CodeQL tools for scanning.
|
||||
- name: Initialize CodeQL
|
||||
uses: github/codeql-action/init@v4
|
||||
with:
|
||||
languages: ${{ matrix.language }}
|
||||
trap-caching: false
|
||||
|
||||
- run: |
|
||||
sudo apt-get install -y ninja-build pipx gcc g++
|
||||
pip3 install meson==0.55.1
|
||||
"$HOME/.local/bin/meson" setup build
|
||||
|
||||
- name: Perform CodeQL Analysis
|
||||
uses: github/codeql-action/analyze@v4
|
||||
+49
@@ -0,0 +1,49 @@
|
||||
name: deploy
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [ master ]
|
||||
|
||||
jobs:
|
||||
no-tests:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/setup-python@v6
|
||||
- name: Filter Repository
|
||||
run: |
|
||||
pip install git-filter-repo
|
||||
git-filter-repo --force --path-rename COPYING:.no-test/COPYING && \
|
||||
git-filter-repo --path-rename '.no-test/':'simde/' && \
|
||||
git-filter-repo --subdirectory-filter simde
|
||||
- name: GitHub Push
|
||||
uses: ad-m/github-push-action@v1.0.0
|
||||
with:
|
||||
github_token: ${{ secrets.PUSH_TO_NO_TESTS_TOKEN }}
|
||||
repository: simd-everywhere/simde-no-tests
|
||||
|
||||
status:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
persist-credentials: false
|
||||
fetch-depth: 0
|
||||
- uses: actions/checkout@v6
|
||||
with:
|
||||
fetch-depth: 0
|
||||
repository: simd-everywhere/implementation-status
|
||||
token: ${{ secrets.PUSH_IMPLEMENTATION_STATUS_TOKEN }}
|
||||
path: implementation-status
|
||||
- name: Install APT Dependencies
|
||||
run: sudo apt-get update && sudo apt-get install -y python3-lxml
|
||||
- name: Update
|
||||
run: ./implementation-status/scripts/update.sh .
|
||||
- uses: EndBug/add-and-commit@v9
|
||||
with:
|
||||
cwd: implementation-status
|
||||
message: Sync with latest SIMDe.
|
||||
default_author: github_actions
|
||||
+331
@@ -0,0 +1,331 @@
|
||||
name: GCC-16
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- 'master'
|
||||
workflow_dispatch: {}
|
||||
repository_dispatch:
|
||||
types: [on-demand-gcc-16]
|
||||
|
||||
concurrency:
|
||||
group: gcc-snapshot-${{ github.event.pull_request.number || github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
jobs:
|
||||
x86:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
isax:
|
||||
- -DSIMDE_NATURAL_VECTOR_SIZE=256 -march=x86-64-v3 -mavx512bw -mavx512vl
|
||||
# https://en.wikipedia.org/wiki/X86-64#Microarchitecture_levels
|
||||
- -march=x86-64 -maes -mpclmul # the x86-64 baseline is CMOV, CX8, FPU, FXSR, MMX, OSFXSR, SCE, SSE, SSE2
|
||||
- -march=x86-64-v2 # CMPXCHG16B, LAHF-SAHF, POPCNT, SSE3, SSE4_1, SSE4_2, SSSE3
|
||||
- -march=x86-64-v3 # AVX, AVX2, BMI1, BMI2, F16C, FMA, LZCNT, MOVBE, OSXSAVE
|
||||
- -march=x86-64-v4 # AVX512F, AVX512BW, AVX512CD, AVX512DQ, AVX512VL a.k.a. skylake+ (including zen4)
|
||||
include:
|
||||
- target: tgl
|
||||
- isax: -march=x86-64-v4 -mcx16 -mxsave -mpclmul -mfsgsbase -mrdrnd -mhle -mrdseed -maes -mclflushopt -mxsavec -mxsaves -msgx -mpku -msha -mrdpid -mavx512vpopcntdq -mavx512ifma -mavx512vbmi -mavx512vnni -mavx512vbmi2 -mavx512bitalg -mvpclmulqdq -mgfni -mvaes # icelake
|
||||
target: icl
|
||||
- isax: -march=x86-64-v4 -mcx16 -mxsave -mpclmul -mfsgsbase -mrdrnd -mhle -mrdseed -maes -mclflushopt -mxsavec -mxsaves -msgx -mpku -msha -mrdpid -mavx512vpopcntdq -mavx512ifma -mavx512vbmi -mavx512vnni -mavx512vbmi2 -mavx512bitalg -mvpclmulqdq -mgfni -mvaes -mpconfig -mwbnoinvd -mclwb -mmovdiri -mmovdir64b -menqcmd -mcldemote -mptwrite -mwaitpkg -mserialize -mtsxldtrk -muintr -mavxvnni -mavx512fp16 # sapphire rapids without bf16
|
||||
# See https://github.com/simd-everywhere/simde/issues/1095
|
||||
target: spr
|
||||
env:
|
||||
CFLAGS: -Wall -Wextra -Werror ${{ matrix.isax }}
|
||||
CXXFLAGS: -Wall -Wextra -Werror ${{ matrix.isax }}
|
||||
INTEL_TARGET: ${{ matrix.target }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: ${{ github.event.client_payload.repository }}
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- name: CPU Information
|
||||
run: cat /proc/cpuinfo
|
||||
- name: Install APT Dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:misterc/gcc-snapshot-latest-lts
|
||||
# sudo add-apt-repository ppa:stephanosio/ccache
|
||||
sudo apt-get install -y --no-install-recommends ninja-build pipx
|
||||
sudo apt-get install -y ${{ github.event.client_payload.extra }} gcc-16 g++-16 # ccache
|
||||
sudo apt-get purge -y gcc g++
|
||||
sudo ln -s /usr/bin/gcc-16 /usr/bin/gcc
|
||||
sudo ln -s /usr/bin/g++-16 /usr/bin/g++
|
||||
pipx install meson==0.55.1
|
||||
# - name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# key: gcc-16-${{ github.job }}-${{ matrix.isax }}
|
||||
# verbose: 2
|
||||
# - name: add ccache to the build path
|
||||
# run: |
|
||||
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
- name: Configure
|
||||
run: meson setup build || (cat build/meson-logs/meson-log.txt ; false)
|
||||
- name: Test run native?
|
||||
run: |
|
||||
test/check-flags.sh query && echo Tests with "$CFLAGS" will be run natively
|
||||
test/check-flags.sh query || echo Tests with "$CFLAGS" will be run using SDE
|
||||
- name: Build
|
||||
run: ninja -C build -v
|
||||
- name: Test
|
||||
run: |
|
||||
# shellcheck disable=SC2046
|
||||
meson test -C build --print-errorlogs --wrapper "${GITHUB_WORKSPACE}/test/check-flags.sh sde" # $(meson test -C build --list | grep -v emul)
|
||||
|
||||
x86-xop:
|
||||
runs-on: ubuntu-24.04
|
||||
strategy:
|
||||
fail-fast: false
|
||||
env:
|
||||
CFLAGS: -Wall -Wextra -Werror -march=bdver2
|
||||
CXXFLAGS: -Wall -Wextra -Werror -march=bdver2
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: ${{ github.event.client_payload.repository }}
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- name: CPU Information
|
||||
run: cat /proc/cpuinfo
|
||||
- name: Install APT Dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:misterc/gcc-snapshot-latest-lts
|
||||
# sudo add-apt-repository ppa:stephanosio/ccache
|
||||
sudo apt-get install -y --no-install-recommends ninja-build pipx \
|
||||
qemu-user-static # ccache
|
||||
sudo apt-get install -y ${{ github.event.client_payload.extra }} gcc-16 g++-16
|
||||
sudo apt-get purge -y gcc g++
|
||||
sudo ln -s /usr/bin/gcc-16 /usr/bin/gcc
|
||||
sudo ln -s /usr/bin/g++-16 /usr/bin/g++
|
||||
pipx install meson==0.55.1
|
||||
# - name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# key: gcc-16-${{ github.job }}
|
||||
# verbose: 2
|
||||
# - name: add ccache to the build path
|
||||
# run: |
|
||||
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
- name: Configure
|
||||
run: meson setup build || (cat build/meson-logs/meson-log.txt ; false)
|
||||
- name: Build
|
||||
run: ninja -C build -v
|
||||
# can't test until we find a combination of `gcc -march=` and `qemu -cpu` that both enable XOP and allows qemu to test it
|
||||
# - name: Test
|
||||
# run: meson test -C build --print-errorlogs --wrapper "qemu-amd64-static -cpu Opteron_G5-v1"
|
||||
|
||||
sleef:
|
||||
runs-on: ubuntu-24.04
|
||||
env:
|
||||
CFLAGS: -march=native -Wall -Wextra -Werror
|
||||
CXXFLAGS: -march=native -Wall -Wextra -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: ${{ github.event.client_payload.repository }}
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- id: cpu
|
||||
name: CPU Information
|
||||
run: |
|
||||
cat /proc/cpuinfo
|
||||
- name: Install APT Dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:misterc/gcc-snapshot-latest-lts
|
||||
# sudo add-apt-repository ppa:stephanosio/ccache
|
||||
sudo apt-get install -y --no-install-recommends ninja-build pipx \
|
||||
libsleef-dev # ccache
|
||||
sudo apt-get install -y ${{ github.event.client_payload.extra }} gcc-16 g++-16
|
||||
sudo apt-get purge -y gcc g++
|
||||
sudo ln -s /usr/bin/gcc-16 /usr/bin/gcc
|
||||
sudo ln -s /usr/bin/g++-16 /usr/bin/g++
|
||||
pipx install meson==0.55.1
|
||||
# - name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# key: gcc-16-${{ github.job }}
|
||||
# verbose: 2
|
||||
# - name: add ccache to the build path
|
||||
# run: |
|
||||
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
- name: Configure
|
||||
run: meson setup build -Dsleef=enabled || (cat build/meson-logs/meson-log.txt ; false)
|
||||
- name: Build
|
||||
run: ninja -C build -v
|
||||
- name: Test
|
||||
run: |
|
||||
# shellcheck disable=SC2046
|
||||
meson test -C build --print-errorlogs # $(meson test -C build --list | grep -v emul)
|
||||
|
||||
gcc-16:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- distro: ubuntu-24.04
|
||||
arch_flags: -ffast-math
|
||||
- distro: ubuntu-24.04
|
||||
- distro: ubuntu-24.04-arm
|
||||
runs-on: ${{ matrix.distro }}
|
||||
env:
|
||||
CFLAGS: ${{ matrix.arch_flags }} -march=native -Wall -Wextra -Werror
|
||||
CXXFLAGS: ${{ matrix.arch_flags }} -march=native -Wall -Wextra -Werror
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: ${{ github.event.client_payload.repository }}
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- id: cpu
|
||||
name: CPU Information
|
||||
run: |
|
||||
cat /proc/cpuinfo
|
||||
- name: Install APT Dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:misterc/gcc-snapshot-latest-lts
|
||||
# sudo add-apt-repository ppa:stephanosio/ccache
|
||||
sudo apt-get -y install --no-install-recommends pipx ninja-build \
|
||||
# ccache
|
||||
sudo apt-get install -y ${{ github.event.client_payload.extra }} gcc-16 g++-16
|
||||
sudo apt-get -y purge g++ gcc
|
||||
sudo ln -s /usr/bin/gcc-16 /usr/bin/gcc
|
||||
sudo ln -s /usr/bin/g++-16 /usr/bin/g++
|
||||
pipx install meson==0.55.1
|
||||
# - name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# key: ${{ github.job }}-${{ matrix.version }}-${{ matrix.distro }}-${{ matrix.arch_flags }}
|
||||
# verbose: 2
|
||||
# - name: add ccache to the build path
|
||||
# run: |
|
||||
# export PATH="/usr/lib/ccache:/usr/local/opt/ccache/libexec:$PATH"
|
||||
- name: Configure
|
||||
run: meson setup build || (cat build/meson-logs/meson-log.txt ; false)
|
||||
- name: Build
|
||||
run: meson compile -C build --verbose
|
||||
- name: Test
|
||||
run: |
|
||||
# shellcheck disable=SC2046
|
||||
meson test -C build --print-errorlogs # $(meson test -C build --list | grep -v emul)
|
||||
|
||||
gcc-qemu:
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
include:
|
||||
- version: 16
|
||||
cross: armel
|
||||
arch_gnu_abi: eabi
|
||||
arch_deb: armel
|
||||
arch_gnu: arm
|
||||
distro: ubuntu-24.04
|
||||
- version: 16
|
||||
cross: armv7
|
||||
arch_gnu: arm
|
||||
arch_gnu_abi: eabihf
|
||||
arch_deb: armhf
|
||||
distro: ubuntu-24.04
|
||||
- version: 16
|
||||
extra: -no-extras
|
||||
cross: aarch64
|
||||
arch_gnu: aarch64
|
||||
arch_deb: arm64
|
||||
distro: ubuntu-24.04
|
||||
- version: 16
|
||||
cross: aarch64
|
||||
arch_gnu: aarch64
|
||||
arch_deb: arm64
|
||||
distro: ubuntu-24.04
|
||||
- extra: -32bit
|
||||
version: 16
|
||||
cross: armv8
|
||||
arch_gnu: arm
|
||||
arch_gnu_abi: eabihf
|
||||
arch_deb: armhf
|
||||
distro: ubuntu-24.04
|
||||
- version: 16
|
||||
cross: riscv64
|
||||
arch_gnu: riscv64
|
||||
arch_deb: riscv64
|
||||
distro: ubuntu-24.04
|
||||
- extra: -O3
|
||||
version: 16
|
||||
cross: riscv64
|
||||
arch_gnu: riscv64
|
||||
arch_deb: riscv64
|
||||
distro: ubuntu-24.04
|
||||
- version: 16
|
||||
cross: s390x
|
||||
arch_gnu: s390x
|
||||
arch_deb: s390x
|
||||
distro: ubuntu-24.04
|
||||
# - version: 16
|
||||
# cross: power9
|
||||
# arch_gnu: powerpc64le
|
||||
# arch_deb: ppc64el
|
||||
# distro: ubuntu-24.04
|
||||
- version: 16
|
||||
cross: loongarch64
|
||||
arch_gnu: loongarch64
|
||||
arch_deb: loong64
|
||||
distro: ubuntu-24.04
|
||||
runs-on: ${{ matrix.distro }}
|
||||
steps:
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name != 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
- uses: actions/checkout@v6
|
||||
if: ${{ github.event_name == 'repository_dispatch' }}
|
||||
with:
|
||||
submodules: recursive
|
||||
repository: ${{ github.event.client_payload.repository }}
|
||||
ref: ${{ github.event.client_payload.ref }}
|
||||
- name: CPU Information
|
||||
run: cat /proc/cpuinfo
|
||||
- name: Install APT Dependencies
|
||||
run: |
|
||||
sudo add-apt-repository ppa:misterc/gcc-snapshot-latest-lts
|
||||
sudo apt-get -y --no-install-recommends install ccache ninja-build \
|
||||
binfmt-support qemu-user-static pipx libc6-${{ matrix.arch_deb }}-cross
|
||||
sudo apt-get install -y ${{ github.event.client_payload.extra }} \
|
||||
gcc-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }} \
|
||||
g++-${{ matrix.version }}-${{ matrix.arch_gnu }}-linux-gnu${{ matrix.arch_gnu_abi }} \
|
||||
libstdc++-${{ matrix.version }}-dev-${{ matrix.arch_deb }}-cross
|
||||
pipx install meson==0.55.1
|
||||
# - name: ccache
|
||||
# uses: hendrikmuhs/ccache-action@v1.2
|
||||
# with:
|
||||
# key: ${{ github.job }}-${{ matrix.version}}${{ matrix.extra }}-${{ matrix.distro }}-${{ matrix.cross }}
|
||||
# verbose: 2
|
||||
- name: Configure
|
||||
run: meson setup --cross-file=docker/cross-files/${{ matrix.cross }}-gcc-${{ matrix.version }}${{ matrix.extra}}-ccache.cross build || (cat build/meson-logs/meson-log.txt ; false)
|
||||
- name: Build
|
||||
run: ninja -C build -v
|
||||
- name: Test
|
||||
run: |
|
||||
# shellcheck disable=SC2046
|
||||
meson test -C build --print-errorlogs --print-errorlogs
|
||||
@@ -0,0 +1,45 @@
|
||||
# This workflow integrates a collection of open source static analysis tools
|
||||
# with GitHub code scanning. For documentation, or to provide feedback, visit
|
||||
# https://github.com/github/ossar-action
|
||||
name: OSSAR
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [master]
|
||||
|
||||
jobs:
|
||||
OSSAR-Scan:
|
||||
# OSSAR runs on windows-latest.
|
||||
# ubuntu-latest and macos-latest support coming soon
|
||||
runs-on: windows-latest
|
||||
|
||||
steps:
|
||||
# Checkout your code repository to scan
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v6
|
||||
with:
|
||||
# We must fetch at least the immediate parents so that if this is
|
||||
# a pull request then we can checkout the head.
|
||||
fetch-depth: 2
|
||||
|
||||
# If this run was triggered by a pull request event, then checkout
|
||||
# the head of the pull request instead of the merge commit.
|
||||
- run: git checkout HEAD^2
|
||||
if: ${{ github.event_name == 'pull_request' }}
|
||||
|
||||
# Install dotnet, used by OSSAR
|
||||
- name: Install .NET
|
||||
uses: actions/setup-dotnet@v5
|
||||
with:
|
||||
dotnet-version: '6.0.x'
|
||||
|
||||
# Run open source static analysis tools
|
||||
- name: Run OSSAR
|
||||
uses: github/ossar-action@v1
|
||||
id: ossar
|
||||
|
||||
# Upload results to the Security tab
|
||||
- name: Upload OSSAR results
|
||||
uses: github/codeql-action/upload-sarif@v4
|
||||
with:
|
||||
sarif_file: ${{ steps.ossar.outputs.sarifFile }}
|
||||
+30
@@ -0,0 +1,30 @@
|
||||
name: Cleanup github runner caches on closed pull requests
|
||||
on:
|
||||
pull_request:
|
||||
types:
|
||||
- closed
|
||||
|
||||
jobs:
|
||||
cleanup:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
actions: write
|
||||
steps:
|
||||
- name: Cleanup
|
||||
run: |
|
||||
echo "Fetching list of cache keys"
|
||||
readarray -t cacheKeysForPR < <(gh cache list --ref "${BRANCH}" --json id --jq '.[].id')
|
||||
|
||||
## Setting this to not fail the workflow while deleting cache keys.
|
||||
set +e
|
||||
echo "Deleting caches..."
|
||||
for cacheKey in "${cacheKeysForPR[@]}"
|
||||
do
|
||||
gh cache delete "${cacheKey}"
|
||||
done
|
||||
echo "Done"
|
||||
env:
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
GH_REPO: ${{ github.repository }}
|
||||
BRANCH: refs/pull/${{ github.event.pull_request.number }}/merge
|
||||
|
||||
Reference in New Issue
Block a user