Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add daily rebase of Cygwin to rebase.yml #203

Merged
merged 1 commit into from
Oct 10, 2024
Merged
Show file tree
Hide file tree
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
2 changes: 2 additions & 0 deletions .github/scripts/toolchain/patch-cygwin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ echo "::group::Patch Cygwin"
if [[ "$STAGE" = "1" ]]; then
patch -p1 -i $PATCH_DIR/0002-after-autogen.patch
fi

patch -p1 -i $PATCH_DIR/0003-fix-mingw.patch
echo "::endgroup::"

echo 'Success!'
48 changes: 48 additions & 0 deletions .github/workflows/rebase.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,8 @@ env:
GCC_UPSTREAM_URL: git://gcc.gnu.org/git/gcc.git
MINGW_REPO: Windows-on-ARM-Experiments/mingw-woarm64
MINGW_UPSTREAM_URL: https://git.code.sf.net/p/mingw-w64/mingw-w64
CYGWIN_REPO: Windows-on-ARM-Experiments/newlib-cygwin
CYGWIN_UPSTREAM_URL: https://cygwin.com/git/newlib-cygwin.git

SOURCE_PATH: ${{ github.workspace }}/code
ORIGIN_BRANCH: ${{ inputs.origin_branch || 'woarm64' }}
Expand Down Expand Up @@ -104,6 +106,29 @@ jobs:
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh ${{ env.MINGW_UPSTREAM_URL }} ${{ env.UPSTREAM_BRANCH }} ${{ env.REBASE_BRANCH }}

start-cygwin-rebase:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}

- name: Checkout Cygwin
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.CYGWIN_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
fetch-depth: 0
path: ${{ env.SOURCE_PATH }}/cygwin

- name: Start Cygwin rebase
working-directory: ${{ env.SOURCE_PATH }}/cygwin
run: |
${{ github.workspace }}/.github/scripts/rebase-start.sh ${{ env.CYGWIN_UPSTREAM_URL }} ${{ env.UPSTREAM_BRANCH }} ${{ env.REBASE_BRANCH }}

build:
needs: [start-binutils-rebase, start-gcc-rebase, start-mingw-rebase]
uses: ./.github/workflows/advanced.yml
Expand Down Expand Up @@ -181,6 +206,29 @@ jobs:
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh ${{ env.REBASE_BRANCH }} ${{ env.ORIGIN_BRANCH }}

finish-cygwin-rebase:
needs: [build]
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v4
with:
path: ${{ github.workspace }}

- name: Checkout Cygwin
uses: actions/checkout@v4
with:
token: ${{ secrets.GNU_PUSH_PAT }}
repository: ${{ env.CYGWIN_REPO }}
ref: ${{ env.ORIGIN_BRANCH }}
path: ${{ env.SOURCE_PATH }}/cygwin

- name: Finish Cygwin rebase
working-directory: ${{ env.SOURCE_PATH }}/cygwin
run: |
${{ github.workspace }}/.github/scripts/rebase-finish.sh ${{ env.REBASE_BRANCH }} ${{ env.ORIGIN_BRANCH }}

deploy:
needs: [build]
runs-on: ubuntu-latest
Expand Down
29 changes: 29 additions & 0 deletions patches/cygwin/0003-fix-mingw.patch
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
--- a/winsup/cygwin/local_includes/ntdll.h
+++ b/winsup/cygwin/local_includes/ntdll.h
@@ -489,26 +489,6 @@ typedef struct _FILE_DISPOSITION_INFORMATION_EX // 64
ULONG Flags;
} FILE_DISPOSITION_INFORMATION_EX, *PFILE_DISPOSITION_INFORMATION_EX;

-typedef struct _FILE_STAT_INFORMATION // 68
-{
- LARGE_INTEGER FileId;
- LARGE_INTEGER CreationTime;
- LARGE_INTEGER LastAccessTime;
- LARGE_INTEGER LastWriteTime;
- LARGE_INTEGER ChangeTime;
- LARGE_INTEGER AllocationSize;
- LARGE_INTEGER EndOfFile;
- ULONG FileAttributes;
- ULONG ReparseTag;
- ULONG NumberOfLinks;
- ACCESS_MASK EffectiveAccess;
-} FILE_STAT_INFORMATION, *PFILE_STAT_INFORMATION;
-
-typedef struct _FILE_CASE_SENSITIVE_INFORMATION // 71
-{
- ULONG Flags;
-} FILE_CASE_SENSITIVE_INFORMATION, *PFILE_CASE_SENSITIVE_INFORMATION;
-
enum {
FILE_LINK_REPLACE_IF_EXISTS = 0x01,
FILE_LINK_POSIX_SEMANTICS = 0x02,
Loading