ADDED .github/workflows/macos-12.yml Index: .github/workflows/macos-12.yml ================================================================== --- /dev/null +++ .github/workflows/macos-12.yml @@ -0,0 +1,31 @@ +name: macos-12 +on: [push, pull_request] +jobs: + tests: + runs-on: macos-12 + strategy: + matrix: + configure_flags: + - + - --disable-threads + - --disable-threads --disable-sockets + - --disable-threads --disable-files + - --disable-threads --disable-sockets --disable-files + - --disable-sockets + - --disable-sockets --disable-files + - --disable-files + - --disable-shared + steps: + - name: Install dependencies + run: brew install autoconf automake + - uses: actions/checkout@v4 + - name: autogen.sh + run: ./autogen.sh + - name: configure + run: ./configure ${{ matrix.configure_flags }} + - name: make + run: make -j$(sysctl -n hw.logicalcpu) + - name: make check + run: make check + - name: make install + run: sudo make install DELETED .github/workflows/macos-latest.yml Index: .github/workflows/macos-latest.yml ================================================================== --- .github/workflows/macos-latest.yml +++ /dev/null @@ -1,31 +0,0 @@ -name: macos-latest -on: [push, pull_request] -jobs: - tests: - runs-on: macos-latest - strategy: - matrix: - configure_flags: - - - - --disable-threads - - --disable-threads --disable-sockets - - --disable-threads --disable-files - - --disable-threads --disable-sockets --disable-files - - --disable-sockets - - --disable-sockets --disable-files - - --disable-files - - --disable-shared - steps: - - name: Install dependencies - run: brew install autoconf automake - - uses: actions/checkout@v4 - - name: autogen.sh - run: ./autogen.sh - - name: configure - run: ./configure ${{ matrix.configure_flags }} - - name: make - run: make -j$(sysctl -n hw.logicalcpu) - - name: make check - run: make check - - name: make install - run: sudo make install Index: configure.ac ================================================================== --- configure.ac +++ configure.ac @@ -1,14 +1,13 @@ -AC_INIT(ObjFW, 1.2dev, js@nil.im, objfw, https://objfw.nil.im/) +AC_INIT(ObjFW, 1.1.2, js@nil.im, objfw, https://objfw.nil.im/) AC_CONFIG_SRCDIR(src) AC_CONFIG_AUX_DIR(build-aux) AC_CONFIG_MACRO_DIR(build-aux/m4) AC_DEFINE(OBJFW_VERSION_MAJOR, 1, [The major version of ObjFW]) -AC_DEFINE(OBJFW_VERSION_MINOR, 2, [The minor version of ObjFW]) -dnl This may only be set to 1.2 once 1.2 is released -AC_SUBST(BUNDLE_VERSION, 1.1.0) +AC_DEFINE(OBJFW_VERSION_MINOR, 1, [The minor version of ObjFW]) +AC_SUBST(BUNDLE_VERSION, 1.1.2) AC_SUBST(BUNDLE_SHORT_VERSION, 1.1) for i in configure.ac build-aux/m4/*; do AS_IF([test $i -nt configure], [ AC_MSG_ERROR([$i is newer than configure! Run ./autogen.sh!]) @@ -2042,11 +2041,11 @@ AS_IF([test x"$GOBJC" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -Wwrite-strings -Wpointer-arith" AC_ARG_ENABLE(werror, AS_HELP_STRING([--disable-werror], [do not build with -Werror])) - AS_IF([test x"$enable_werror" != x"no"], [ + AS_IF([test x"$enable_werror" = x"yes"], [ OBJCFLAGS="$OBJCFLAGS -Werror" ]) old_OBJCFLAGS="$OBJCFLAGS" OBJCFLAGS="$OBJCFLAGS -Werror" Index: tests/OFFileManagerTests.m ================================================================== --- tests/OFFileManagerTests.m +++ tests/OFFileManagerTests.m @@ -306,12 +306,17 @@ IRIByAppendingPathComponent: @"destination"]; OFFileAttributes attributes; [@"test" writeToIRI: sourceIRI]; - [_fileManager linkItemAtPath: sourceIRI.fileSystemRepresentation - toPath: destinationIRI.fileSystemRepresentation]; + @try { + [_fileManager + linkItemAtPath: sourceIRI.fileSystemRepresentation + toPath: destinationIRI.fileSystemRepresentation]; + } @catch (OFNotImplementedException *e) { + OTSkip(@"Links not supported"); + } attributes = [_fileManager attributesOfItemAtIRI: destinationIRI]; OTAssertEqual(attributes.fileType, OFFileTypeRegular); OTAssertEqual(attributes.fileSize, 4); OTAssertEqualObjects([OFString stringWithContentsOfIRI: destinationIRI], @@ -348,10 +353,12 @@ @throw e; OTSkip(@"No permission to create symlink.\n" @"On Windows, only the administrator can create symbolic " @"links."); + } @catch (OFNotImplementedException *e) { + OTSkip(@"Symlinks not supported"); } attributes = [_fileManager attributesOfItemAtIRI: destinationIRI]; OTAssertEqual(attributes.fileType, OFFileTypeSymbolicLink); OTAssertEqualObjects([OFString stringWithContentsOfIRI: destinationIRI], Index: tests/subprocess/Subprocess.m ================================================================== --- tests/subprocess/Subprocess.m +++ tests/subprocess/Subprocess.m @@ -34,14 +34,22 @@ if (![[OFApplication arguments] isEqual: [OFArray arrayWithObjects: @"tést", @"123", nil]]) [OFApplication terminateWithStatus: 1]; if (![[[OFApplication environment] objectForKey: @"tëst"] - isEqual: @"yés"]) + isEqual: @"yés"]) { [OFApplication terminateWithStatus: 2]; + } - while ((line = [OFStdIn readLine]) != nil) - [OFStdOut writeLine: line.uppercaseString]; +#ifdef OF_WINDOWS + /* On Windows 9x, closing the pipe doesn't seem to cause EOF. */ + if (![OFSystemInfo isWindowsNT]) { + if ((line = [OFStdIn readLine]) != nil) + [OFStdOut writeLine: line.uppercaseString]; + } else +#endif + while ((line = [OFStdIn readLine]) != nil) + [OFStdOut writeLine: line.uppercaseString]; [OFApplication terminate]; } @end