diff --git a/.github/workflows/android-perf.yml b/.github/workflows/android-perf.yml index 48625898ae9..1874a4fd6ee 100644 --- a/.github/workflows/android-perf.yml +++ b/.github/workflows/android-perf.yml @@ -98,6 +98,7 @@ jobs: - uses: actions/checkout@v3 - name: Prepare the spec + id: prepare shell: bash env: BENCHMARK_CONFIG: ${{ toJSON(matrix) }} @@ -111,7 +112,7 @@ jobs: # so let's just sed it sed -i -e 's,{{ model_path }},'"${MODEL_PATH}"',g' android-llm-device-farm-test-spec.yml.j2 - BENCHMARK_CONFIG_ID="${{ matrix.model }}_${{ matrix.config }}" + BENCHMARK_CONFIG_ID=$(echo "${{ matrix.model }}_${{ matrix.config }}" | sed -e 's/[^A-Za-z0-9._-]/_/g') # The config for this benchmark runs, we save it in the test spec so that it can be fetched # later by the upload script sed -i -e 's,{{ benchmark_config_id }},'"${BENCHMARK_CONFIG_ID}"',g' android-llm-device-farm-test-spec.yml.j2 @@ -122,6 +123,7 @@ jobs: # Save the benchmark configs so that we can use it later in the dashboard echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_ID}.json" + echo "benchmark-config-id=${BENCHMARK_CONFIG_ID}" >> $GITHUB_OUTPUT - name: Upload the spec uses: seemethere/upload-artifact-s3@v5 @@ -141,7 +143,7 @@ jobs: ${{ github.repository }}/${{ github.run_id }}/artifacts/benchmark-configs/ retention-days: 1 if-no-files-found: error - path: extension/benchmark/android/benchmark/${{ matrix.model }}_${{ matrix.config }}.json + path: extension/benchmark/android/benchmark/${{ steps.prepare.outputs.benchmark-config-id }}.json export-models: name: export-models diff --git a/.github/workflows/apple-perf.yml b/.github/workflows/apple-perf.yml index b35daebaf5b..f4fbc0128b5 100644 --- a/.github/workflows/apple-perf.yml +++ b/.github/workflows/apple-perf.yml @@ -100,6 +100,7 @@ jobs: - uses: actions/checkout@v3 - name: Prepare the spec + id: prepare shell: bash env: BENCHMARK_CONFIG: ${{ toJSON(matrix) }} @@ -113,7 +114,7 @@ jobs: # so let's just sed it sed -i -e 's,{{ model_path }},'"${MODEL_PATH}"',g' default-ios-device-farm-appium-test-spec.yml.j2 - BENCHMARK_CONFIG_ID="${{ matrix.model }}_${{ matrix.config }}" + BENCHMARK_CONFIG_ID=$(echo "${{ matrix.model }}_${{ matrix.config }}" | sed -e 's/[^A-Za-z0-9._-]/_/g') # The config for this benchmark runs, we save it in the test spec so that it can be fetched # later by the upload script sed -i -e 's,{{ benchmark_config_id }},'"${BENCHMARK_CONFIG_ID}"',g' default-ios-device-farm-appium-test-spec.yml.j2 @@ -124,6 +125,7 @@ jobs: # Save the benchmark configs so that we can use it later in the dashboard echo "${BENCHMARK_CONFIG}" > "${BENCHMARK_CONFIG_ID}.json" + echo "benchmark-config-id=${BENCHMARK_CONFIG_ID}" >> $GITHUB_OUTPUT - name: Upload the spec uses: seemethere/upload-artifact-s3@v5 @@ -143,7 +145,7 @@ jobs: ${{ github.repository }}/${{ github.run_id }}/artifacts/benchmark-configs/ retention-days: 1 if-no-files-found: error - path: extension/benchmark/apple/Benchmark/${{ matrix.model }}_${{ matrix.config }}.json + path: extension/benchmark/apple/Benchmark/${{ steps.prepare.outputs.benchmark-config-id }}.json export-models: name: export-models