Skip to content

Commit

Permalink
gh action ng 2
Browse files Browse the repository at this point in the history
  • Loading branch information
valord577 committed Aug 23, 2024
1 parent 090ad93 commit 1f13033
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 9 deletions.
21 changes: 13 additions & 8 deletions .github/workflows/_matrix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,19 +63,26 @@ jobs:
strategy:
matrix: ${{ fromJson(needs._preset.outputs.matrix) }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: ${{ startsWith('${{ matrix.os }}', 'windows') && 'pwsh' || 'bash' }}
working-directory: ${{ github.workspace }}
env:
INST_DIR: "${{ github.workspace }}/${{ github.workflow }}"
INST_DIR: ${{ github.workspace }}/${{ github.workflow }}
CCACHE_DIR: ${{ github.workspace }}/.ccache
CCACHE_GHA_KEY: ${{ matrix.pkg_type }}-${{ matrix.platform }}-${{ matrix.arch }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}
CCACHE_GHA_KEY_RESTORE: ${{ matrix.pkg_type }}-${{ matrix.platform }}-${{ matrix.arch }}
PKG_ZIP_NAME: ${{ github.workflow }}_${{ matrix.platform }}_${{ matrix.arch }}_${{ needs._preset.outputs.pkgver }}_${{ matrix.pkg_type }}
steps:
- name: clone with gh
run: |
gh repo clone ${{ github.repositoryUrl }} . -- --no-checkout --single-branch --depth=1
git fetch --no-tags --prune --no-recurse-submodules --depth=1 origin +${{ github.sha }}; git checkout FETCH_HEAD
- name: install required software(s)
run: |
brew list -l; brew install ccache nasm
if [[ ${{ startsWith('${{ matrix.os }}', 'macos') }} ]]; then
brew list -l; brew install ccache nasm
fi
- name: gh action ccache restore
uses: actions/cache/restore@v4
with:
Expand All @@ -92,17 +99,15 @@ jobs:
with:
path: ${{ env.CCACHE_DIR }}
key: ${{ env.CCACHE_GHA_KEY }}
- name: set required env `_PKG_ZIP_NAME`
run: |
echo "_PKG_ZIP_NAME=${{ github.workflow }}_${{ matrix.platform }}_${{ matrix.arch }}_${{ needs._preset.outputs.pkgver }}_${{ matrix.pkg_type }}" >> "$GITHUB_ENV"
- name: compress library - ${{ github.workflow }}
run: |
zip -ry "${{ env._PKG_ZIP_NAME }}.zip" ${{ github.workflow }}
zip -ry "${{ env.PKG_ZIP_NAME }}.zip" ${{ github.workflow }}
- name: upload library - ${{ github.workflow }}
uses: actions/upload-artifact@v4
with:
name: ${{ env._PKG_ZIP_NAME }}
path: ${{ env._PKG_ZIP_NAME }}.zip
name: ${{ env.PKG_ZIP_NAME }}
path: ${{ env.PKG_ZIP_NAME }}.zip


_upload:
needs:
Expand Down
2 changes: 1 addition & 1 deletion scripts/ffmpeg.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ set -e
# ----------------------------
source "${PROJ_ROOT}/pkg-conf.sh"
dl_pkgc mbedtls '2ca6c28' static '' '--enable-mbedtls'
dl_pkgc sdl2 'fb14975' static '' ''
dl_pkgc sdl2 'ba2f78a' static '' ''

printf "\e[1m\e[35m%s\e[0m\n" "${PKG_CONFIG_PATH}"
# ----------------------------
Expand Down

0 comments on commit 1f13033

Please sign in to comment.