-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
95 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
#!/bin/bash | ||
|
||
set -e # exit on error | ||
set -x # echo on | ||
|
||
sed -i 's/\(BUILDENV=(.*\)!ccache\(.*\)/\1ccache\2/g' /etc/makepkg.conf | ||
cat /etc/makepkg.conf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,76 @@ | ||
name: Build MSYS2 package | ||
|
||
on: | ||
workflow_call: | ||
inputs: | ||
package_name: | ||
description: "Package name to build" | ||
type: string | ||
dependencies: | ||
description: "Dependencies to install" | ||
type: string | ||
msys2_packages_branch: | ||
description: "MSYS2-packages branch to build" | ||
type: string | ||
default: "woarm64" | ||
|
||
defaults: | ||
run: | ||
shell: msys2 {0} | ||
|
||
env: | ||
MSYS2_REPO: Windows-on-ARM-Experiments/MSYS2-packages | ||
MSYS2_BRANCH: ${{ inputs.msys2_packages_branch || 'woarm64' }} | ||
|
||
jobs: | ||
build: | ||
runs-on: windows-latest | ||
|
||
steps: | ||
- uses: msys2/setup-msys2@v2 | ||
with: | ||
msystem: MSYS | ||
update: true | ||
install: base-devel | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Enable Ccache | ||
run: | | ||
`cygpath "${{ github.workspace }}"`/.github/scripts/enable-ccache.sh | ||
- name: Ccache | ||
id: cache-ccache | ||
uses: actions/cache@v4 | ||
with: | ||
path: ${{ github.workspace }}/ccache | ||
key: main-ccache | ||
|
||
- name: Checkout MSYS2 packages repository | ||
uses: actions/checkout@v4 | ||
with: | ||
repository: ${{ env.MSYS2_REPO }} | ||
ref: ${{ env.MSYS2_BRANCH }} | ||
path: ${{ github.workspace }}/MSYS2-packages | ||
|
||
- name: Download artifacts | ||
if: ${{ inputs.dependencies }} | ||
shell: powershell | ||
run: | | ||
gh run download ${{ github.run_id }} -n ${{ inputs.dependencies }} | ||
- name: Install artifacts | ||
if: ${{ inputs.dependencies }} | ||
run: pacman -U --noconfirm *.pkg.tar.zst | ||
|
||
- name: Build ${{ inputs.package_name }} | ||
working-directory: ${{ github.workspace }}/MSYS2-packages/${{ inputs.package_name }} | ||
run: makepkg --syncdeps --rmdeps --cleanbuild --noconfirm --noprogressbar --nocheck --force | ||
|
||
- name: Upload ${{ inputs.package_name }} | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: ${{ inputs.package_name }} | ||
retention-days: 1 | ||
path: ${{ github.workspace }}/MSYS2-packages/${{ inputs.package_name }}/*.pkg.tar.zst |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters