Skip to content

adjust target namespace to NeL according to package name #1

adjust target namespace to NeL according to package name

adjust target namespace to NeL according to package name #1

Workflow file for this run

name: "NeL: CI / CD"

Check failure on line 1 in .github/workflows/ci-nel.yml

View workflow run for this annotation

GitHub Actions / NeL: CI / CD

Invalid workflow file

The workflow is not valid. .github/workflows/ci-nel.yml: Anchors are not currently supported. Remove the anchor 'paths'
on:
push:
branches: [ "core4", "feature/*" ]
paths: &paths
- .github/workflows/ci-nel.yml
- nel/**
- CMakeLists.txt
- CMakePresets.txt
pull_request:
branches: [ "core4" ]
paths: *paths
env:
project_name: nel
jobs:
strings:
runs-on: ubuntu-latest
outputs:
build-output-dir: ${{ steps.strings.outputs.build-output-dir }}
build-version: ${{ steps.strings.outputs.build-version }}
steps:
- name: Set reusable strings
id: strings
shell: bash
run: |
echo "build-output-dir=${{ github.workspace }}/build/nel" >> "$GITHUB_OUTPUT"
COMMIT_HASH=${{ github.sha }}
VERSION=$(echo "${{ github.ref }}" | sed -e 's,.*/\(.*\),\1,')
[[ "${{ github.ref }}" == "refs/tags/"* ]] && VERSION=$(echo $VERSION | sed -e 's/^v//')
[ "$VERSION" == "main" ] && VERSION=latest
VERSION="$VERSION+sha.${COMMIT_HASH:0:8}"
echo VERSION=$VERSION
echo "build-version=${VERSION}" >> "$GITHUB_OUTPUT"
configure:
needs: [ strings ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
include:
- os: ubuntu-22.04
preset: linux-${{ env.project_name }}
- os: windows-2022
preset: windows-${{ env.project_name }}
steps:
- uses: lukka/get-cmake@latest
- uses: actions/checkout@v4
- name: Configure CMake
run: cmake --preset ${{ matrix.preset }}
- uses: actions/upload-artifact@v4
with:
name: configure-${{ matrix.os }}
path: ${{ needs.strings.outputs.build-output-dir }}
build:
needs: [ strings, configure ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
steps:
- uses: lukka/get-cmake@latest
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: configure-${{ matrix.os }}
merge-multiple: true
path: ${{ needs.strings.outputs.build-output-dir }}
- name: Build
run: cmake --build --preset ${{ env.project_name }}
- name: Test
run: ctest --preset ${{ env.project_name }}
- uses: actions/upload-artifact@v4
with:
name: build-${{ matrix.os }}
path: ${{ needs.strings.outputs.build-output-dir }}
package:
needs: [ strings, build ]
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-22.04, windows-2022 ]
steps:
- uses: lukka/get-cmake@latest
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
with:
pattern: build-${{ matrix.os }}
merge-multiple: true
path: ${{ needs.strings.outputs.build-output-dir }}
- name: Package
run: cpack --preset ${{ env.project_name }} -R "${{ needs.strings.outputs.build-version }}"
- uses: actions/upload-artifact@v4
with:
name: package-${{ env.project_name }}-${{ matrix.os }}-${{ needs.strings.outputs.build-version }}
path: ${{ needs.strings.outputs.build-output-dir }}/${{ env.project_name }}/ryzomcore-*