Skip to content
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
60 changes: 0 additions & 60 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -133,63 +133,3 @@ jobs:
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}

build-windows:
runs-on: windows-latest
timeout-minutes: 90
strategy:
fail-fast: false
matrix:
arch: [x86_64, i686]
include:
- arch: x86_64
arch2: x86_64
bit: 64
- arch: i686
arch2: x86
bit: 32
env:
OS_NAME: windows
ARCH_NAME: ${{ matrix.arch2 }}
DLL_NAME: libasyncprocess.dll
RESULT_NAME: result-windows-${{ matrix.arch }}
RESULT_PATH: result-windows-${{ matrix.arch }}
RESULT_PATH_SUB: result-async/static
steps:
- run: git config --global core.autocrlf false
- uses: actions/checkout@v2
- uses: msys2/setup-msys2@v2
with:
msystem: MINGW${{ matrix.bit }}
path-type: inherit
release: true
update: true
install: 'base-devel mingw-w64-${{ matrix.arch }}-toolchain'
- name: Run MSYS2 once
shell: msys2 {0}
run: |
pwd
echo $MSYSTEM
echo $MSYS2_PATH_TYPE
echo $PATH
uname
uname -m
- name: Build
shell: msys2 {0}
run: |
gcc -v
rm static/$ARCH_NAME/$OS_NAME/$DLL_NAME
./bootstrap
- name: Copy Result
if: always()
shell: msys2 {0}
run: |
mkdir -p $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
cp static/$ARCH_NAME/$OS_NAME/$DLL_NAME $RESULT_PATH/$RESULT_PATH_SUB/$ARCH_NAME/$OS_NAME
- name: Upload Result
if: always()
uses: actions/upload-artifact@v1
with:
name: ${{ env.RESULT_NAME }}
path: ${{ env.RESULT_PATH }}

5 changes: 4 additions & 1 deletion src/async-process.asd
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,7 @@
:license "MIT"
:depends-on ("cffi")
:serial t
:components ((:file "async-process")))
:components ((:file "async-process_windows"
:if-feature (:or :win32 :windows))
(:file "async-process"
:if-feature (:not (:or :win32 :windows)))))
3 changes: 0 additions & 3 deletions src/async-process.c
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
#include "async-process.h"

#ifndef HAVE_WINDOWS_H

static const char* open_pty(int *out_fd)
{
int fd = posix_openpt(O_RDWR | O_CLOEXEC | O_NOCTTY);
Expand Down Expand Up @@ -133,4 +131,3 @@ int process_alive_p(struct process *process)
{
return kill(process->pid, 0) == 0;
}
#endif
24 changes: 6 additions & 18 deletions src/async-process.h
Original file line number Diff line number Diff line change
Expand Up @@ -5,17 +5,12 @@
# include "config.h"
#endif


#ifdef HAVE_WINDOWS_H
# include <windows.h>
#else
# define _GNU_SOURCE
# include <signal.h>
# include <errno.h>
# include <fcntl.h>
# include <sys/wait.h>
# include <termios.h>
#endif
#define _GNU_SOURCE
#include <signal.h>
#include <errno.h>
#include <fcntl.h>
#include <sys/wait.h>
#include <termios.h>

#include <stdio.h>
#include <unistd.h>
Expand All @@ -25,16 +20,9 @@

struct process {
char buffer[1024*4];
#ifdef HAVE_WINDOWS_H
PROCESS_INFORMATION pi;
HANDLE hInputWrite;
HANDLE hOutputRead;
bool nonblock;
#else
int fd;
char *pty_name;
pid_t pid;
#endif
};

struct process* create_process(char *const command[], bool nonblock, const char *path);
Expand Down
121 changes: 0 additions & 121 deletions src/async-process_windows.c

This file was deleted.

Loading
Loading