Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 7 additions & 10 deletions preternatural-build/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ inputs:
description: 'Directory to run the preternatural command from'
required: false
default: ''
derived_data_path:
description: 'The path to the derived data folder'
required: false
default: "preternatural-derived-data"
fuck-swift-syntax:
description: 'Enable the --fuck-swift-syntax flag for the build command'
required: false
Expand All @@ -45,8 +41,10 @@ runs:
- name: Restore DerivedData Cache
uses: actions/cache/restore@v4
with:
path: "~/preternatural-derived-data"
key: ${{ runner.os }}-${{ github.repository }}-${{ github.ref_name }}-derived-data
path: "~/Library/Developer/Xcode/DerivedData"
key: ${{ runner.os }}-${{ github.repository }}-${{ github.workflow }}-${{ github.ref_name }}-derived-data-${{ hashFiles('**/*') }}
restore-keys: |
${{ runner.os }}-${{ github.repository }}-${{ github.workflow }}-${{ github.ref_name }}-derived-data

- name: Execute preternatural build command
continue-on-error: true
Expand All @@ -55,7 +53,6 @@ runs:
run: |
PLATFORMS=$(echo '${{ inputs.platforms }}' | tr -d '[]' | sed 's/, /,/g')
CONFIGURATIONS=$(echo '${{ inputs.configurations }}' | tr -d '[]' | sed 's/, /,/g')
DERIVED_DATA_PATH=$HOME/${{ inputs.derived_data_path }}

# Change directory if working-directory is provided
if [ ! -z "${{ inputs.working-directory }}" ]; then
Expand All @@ -64,7 +61,7 @@ runs:
fi

# Construct the command as a string
PRETERNATURAL_CMD="script -q /dev/null preternatural build --derived-data-path \"$DERIVED_DATA_PATH\" --platforms $PLATFORMS --configurations $CONFIGURATIONS"
PRETERNATURAL_CMD="script -q /dev/null preternatural build --platforms $PLATFORMS --configurations $CONFIGURATIONS"
if [ "${{ inputs.fuck-swift-syntax }}" == "true" ]; then
PRETERNATURAL_CMD="$PRETERNATURAL_CMD --fuck-swift-syntax"
fi
Expand Down Expand Up @@ -99,8 +96,8 @@ runs:
if: steps.build.outputs.build_succeeded == 'true'
uses: actions/cache/save@v4
with:
path: "~/preternatural-derived-data"
key: ${{ runner.os }}-${{ github.repository }}-${{ github.ref_name }}-derived-data
path: "~/Library/Developer/Xcode/DerivedData"
key: ${{ runner.os }}-${{ github.repository }}-${{ github.workflow }}-${{ github.ref_name }}-derived-data-${{ hashFiles('**/*') }}

- name: Install xclogparser
if: steps.build.outputs.build_succeeded != 'true'
Expand Down
Loading