Skip to content

cleanup workflow & remove katz code #162

cleanup workflow & remove katz code

cleanup workflow & remove katz code #162

Workflow file for this run

name: windows
on:
workflow_dispatch:
pull_request:
types:
- opened
push:
paths-ignore:
- '.github/**'
- '!.github/workflows/windows.yaml'
- 'README.md'
jobs:
build:
runs-on: ${{ matrix.os }}
env:
CACHE_PATH:
CACHE_KEY:
strategy:
matrix:
os: [windows-latest]
arch: [x64]
mode: [release, debug]
compiler: [msvc]
sanitizer: [address]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Download ISPC
run: |
Invoke-WebRequest -Uri "https://github.com/ispc/ispc/releases/download/v1.22.0/ispc-v1.22.0-windows.zip" -OutFile "ispc.zip"
7z x ispc.zip
"ispc-v1.22.0-windows/bin" >> $env:GITHUB_PATH
# Force xmake to a specific folder (for cache)
- name: Set xmake env
run: echo "XMAKE_GLOBALDIR=${{ runner.workspace }}/xmake-global" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Install xmake
- name: Setup xmake
uses: xmake-io/github-action-setup-xmake@v1
with:
xmake-version: branch@master
actions-cache-folder: .xmake-cache
# Update xmake repository (in order to have the file that will be cached)
- name: Update xmake repository
run: xmake repo --update
# Fetch xmake dep hash
- name: Retrieve dependencies hash
id: dep_hash
run: echo "hash=$(xmake l utils.ci.packageskey)" | Out-File -FilePath $env:GITHUB_OUTPUT -Encoding utf8 -Append
- name: Set cache env vars
run: |
echo "CACHE_PATH=${{ env.XMAKE_GLOBALDIR }}\.xmake\packages" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
echo "CACHE_KEY=Windows-${{ matrix.compiler }}-${{ matrix.arch }}-${{ matrix.mode }}-${{ matrix.sanitizer }}-${{ steps.dep_hash.outputs.hash }}" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append
# Cache xmake dependencies
- name: Restore cached xmake dependencies
uses: actions/cache/restore@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_KEY }}
- name: Config
run: |
xmake f -y -a ${{ matrix.arch }} -m ${{ matrix.mode }} --toolchain=${{ matrix.compiler }} --policies=build.sanitizer.${{ matrix.sanitizer }}
- name: Cache xmake dependencies
uses: actions/cache/save@v4
with:
path: ${{ env.CACHE_PATH }}
key: ${{ env.CACHE_KEY }}
- name: Build
run: |
xmake -vD
- name: Test
run: |
xmake test -j1 -v