Skip to content

Commit

Permalink
Add daily rebase of Cygwin to rebase.yml (#203)
Browse files Browse the repository at this point in the history
  • Loading branch information
Blackhex committed Oct 11, 2024
1 parent 5c52178 commit 0d1e7f6
Show file tree
Hide file tree
Showing 4 changed files with 96 additions and 3 deletions.
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!'
13 changes: 11 additions & 2 deletions .github/workflows/advanced.yml
Original file line number Diff line number Diff line change
Expand Up @@ -151,8 +151,8 @@ jobs:
- name: Check `tar` and `zstd` version
shell: bash
run: |
zstd --version
tar --version
zstd --version || true
tar --version || true
- name: Checkout repository
uses: actions/checkout@v4
Expand Down Expand Up @@ -490,6 +490,15 @@ jobs:
run: |
zstd --version
tar --version
exit 0
- name: Install zstd
run: |
Invoke-WebRequest https://github.com/facebook/zstd/releases/download/v1.5.2/zstd-v1.5.2-win64.zip -OutFile $env:RUNNER_TEMP\zstd.zip
Expand-Archive $env:RUNNER_TEMP\zstd.zip -DestinationPath $env:RUNNER_TEMP
Add-Content $env:GITHUB_PATH "$env:RUNNER_TEMP\zstd-v1.5.2-win64"
zstd --version
exit 0
- name: Checkout repository
uses: actions/checkout@v4
Expand Down
55 changes: 54 additions & 1 deletion .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,8 +106,36 @@ 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]
needs: [
start-binutils-rebase,
start-gcc-rebase,
start-mingw-rebase,
start-cygwin-rebase
]
uses: ./.github/workflows/advanced.yml
with:
binutils_branch: ${{ inputs.rebase_branch || 'rebase-upstream' }}
Expand Down Expand Up @@ -181,6 +211,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,

0 comments on commit 0d1e7f6

Please sign in to comment.