Skip to content

Commit

Permalink
GH-43 Attempt to fix build issues
Browse files Browse the repository at this point in the history
  • Loading branch information
Naros committed Dec 31, 2023
1 parent 2304a40 commit beae8d7
Showing 1 changed file with 22 additions and 4 deletions.
26 changes: 22 additions & 4 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,8 +63,22 @@ jobs:
runs-on: ${{ matrix.runner }}
name: ${{ matrix.name }}

outputs:
job_build_type: ${{ steps.set-env.outputs.JOB_BUILD_TYPE }}

steps:

- name: Set JOB_BUILD_TYPE
id: set-env
run: |
if [ "${{ github.event_name }}" == "workflow_dispatch" ]; then
echo "JOB_BUILD_TYPE=${{ github.event.inputs.build_type }}" >> $GITHUB_ENV
echo "::set-output name=JOB_BUILD_TYPE::${{ github.event.inputs.build_type }}"
else
echo "JOB_BUILD_TYPE=release" >> $GITHUB_ENV
echo "::set-output name=JOB_BUILD_TYPE::release"
fi
- name: Checkout project
uses: actions/checkout@v4
with:
Expand Down Expand Up @@ -102,17 +116,21 @@ jobs:
cmake -B ${{ github.workspace }}/.out-${{ matrix.identifier }} -DCMAKE_BUILD_TYPE=${{ matrix.build_type }} -DCMAKE_CXX_COMPILER_LAUNCHER=ccache -DCMAKE_C_COMPILER_LAUNCHER=ccache -DCMAKE_CXX_COMPILER=cl -DCMAKE_C_COMPILER=cl -S ${{ github.workspace }} -G Ninja
- name: Build Orchestrator
if: ${{ github.event.inputs.build_type == 'both' }} || endsWith(matrix.identifier, github.event.inputs.build_type)
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
run: |
cmake --build ${{ github.workspace }}/.out-${{ matrix.identifier }} --target orchestrator -j 18
- name: Prepare addon files
if: ${{ github.event.inputs.build_type == 'both' }} || endsWith(matrix.identifier, github.event.inputs.build_type)
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
shell: bash
run: |
cp '${{ github.workspace }}/AUTHORS.md' '${{ github.workspace }}/CHANGELOG.md' '${{ github.workspace }}/README.md' '${{ github.workspace }}/LICENSE' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/AUTHORS.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/CHANGELOG.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/README.md' '${{ github.workspace }}/project/addons/orchestrator/'
cp '${{ github.workspace }}/LICENSE' '${{ github.workspace }}/project/addons/orchestrator/'
- name: Upload artifact
if: ${{ github.event.inputs.build_type == 'both' }} || endsWith(matrix.identifier, github.event.inputs.build_type)
if: ${{ env.JOB_BUILD_TYPE == 'both' }} || endsWith(matrix.identifier, env.JOB_BUILD_TYPE)
uses: actions/upload-artifact@v3
with:
name: ${{ github.event.repository.name }}-$${ matrix.build_type }}
Expand Down

0 comments on commit beae8d7

Please sign in to comment.