Commit graph

21 commits

Author SHA1 Message Date
Tim Oliver
324e853468 Update build environment to latest OS versions
Summary:
Our CI harness for IGListKit on GitHub recently started to consistently fail at the unit test phase (https://github.com/Instagram/IGListKit/actions/runs/4683650178/jobs/8298963444).

After researching it, it looks like GitHub Actions changed some configurations with their older versions of macOS, and our existing build script no longer seems to be working now. The build output seems to imply that Xcode simply hangs when it gets to the testing phase.

I decided to take this chance to do a thorough audit of all our build steps and update as many of the dependencies as I could to their latest versions. This has fixed the issue, and hopefully given us a decent amount of future-proofing at the same time. :)

Reviewed By: candance

Differential Revision: D45002141

fbshipit-source-id: 40b22da4a9282900ff299b5e41f3a8566c4071f0
2023-04-17 20:41:49 -07:00
Lvv.me
c9e045c942 Improve SwiftPM support (#1546)
Summary:
This diff imports and refines the PR made by cntrump on GitHub.

The PR introduces the following:

* Sample apps now use SPM instead of CocoaPods to import IGListKit.
* Adds Mac Catalyst as an example target.
* Adds C++ flags to the CocoaPods specs.
* Fixes a script issue that was discovered when regenerating the symlinks.

The PR originally aimed to remove the need for symlinked references to the IGListKit and IGListDiffKit source files, but in testing, I couldn't get it working. It's possible SPM being too strict [on where the headers can be placed to be discovered](https://forums.swift.org/t/how-do-i-specify-the-headers-directory-for-a-objc-target-in-swift-package-managers-package-swift/58531/3).

Additionally, another issue was that the original PR changed all of the `#import` statements to the the modular `import` statements, which is fine for the sample apps, but ended up breaking compatibility for any apps that had modules disabled.

## Changes in this pull request

Improve SwiftPM support:

Build module `IGListDiffKit` and `IGListKit` as Objective-C++.

module `IGListDiffKit`:
    - Source/IGListDiffKit
    - module defined in `Source/IGListDiffKit/modulemap/module.modulemap`
    - requires `-fmodules` and `-fcxx-modules`

module `IGListKit`:
    - depend on `IGListDiffKit`, use `import IGListDiffKit;`
    - Source/IGListKit
    - module defined in `Source/IGListKit/modulemap/module.modulemap`
    - requires `-fmodules` and `-fcxx-modules`

module `IGListSwiftKit`:
    - depend on `IGListKit`, use `import IGListKit`
    - Source/IGListSwiftKit

Deleted `spm/` and `scripts/generate_spm_sources_layout.sh`, it is unnecessary.

Updated `.podspec`, add `'OTHER_CFLAGS' => '-fmodules'` and `'OTHER_CPLUSPLUSFLAGS' => '-fcxx-modules'`.

Add missing swift files for `IGListSwiftKit` in `IGListKit.xcodeproj`

### How to use

Replace `#import <IGListDiffKit/IGListDiffKit.h>` with `import IGListDiffKit;`, because `IGListDiffKit.h` isn't exist in `modulemap/`, Or create a symbol link by `ln -sf ../IGListDiffKit.h` for support it ?

### Examples

Use SwiftPM for building examples.

### Checklist

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1546

Test Plan: Test PR showing running tests: https://github.com/TimOliver/IGListKit/actions/runs/4339956050/jobs/7578047058

Reviewed By: lorixx

Differential Revision: D33592395

Pulled By: TimOliver

fbshipit-source-id: 8f7b1873f2b1c6a80908bb55b123e31bea13bb0c
2023-03-06 23:29:41 -08:00
Tim Oliver
f8a339ce16 Updated and reintegrated Danger into GitHub Actions CI
Summary:
Danger is the build tool we've been using to proof-check incoming PRs, including making sure the incoming change is properly documented, and if needed, running SwiftLint on incoming Swift code.

Danger was originally running in our Travis CI implementation, but it wasn't integrated when we switched to GitHub Actions.

This diff updates our Danger dependencies to the latest versions, and integrates Danger into our CI system as a separate build step. I've also modified its SwiftLint setup so it will now lint Swift files in both our sample apps, and the Swift source files in `IGListSwiftKit` itself.

Reviewed By: candance

Differential Revision: D43265158

fbshipit-source-id: 8939b821af36b544fe4d66662b6ce0f99a8f768c
2023-02-28 18:53:02 -08:00
Tim Oliver
f84832118d Integrate Slather into GitHub Actions CI
Summary:
Slather is the utility we've been using to upload our code coverage stats up to Coveralls. It was omitted from our GitHub CI file (Quite possibly because Slather didn't support GitHub Actions at the time), and so our most recent Coverall stats are from April 2020.

This diff integrates Slather into our GitHub Actions CI pipeline. I had to modify the `xcodebuild` commands to remove the GCC settings since having them in there was producing completely empty coverage files. I'm assuming they were necessary for our previous CI setup, but it seems it's okay to drop them now.

Reviewed By: DimaVartanian

Differential Revision: D42995789

fbshipit-source-id: 7a86e262da8bc70b6da1e627a3f0ceb83348db27
2023-02-08 21:51:25 -08:00
Tim Oliver
2ed59fcf80 Update 'master' branch references to 'main' branch
Summary:
G'day folks! As promised, I'm spending a bit of my free time seeing what I can do to update and refresh the IGListKit repo on GitHub.

I noticed last night some strange behaviour in that the GitHub Actions CI wasn't running when new commits were merged into the main branch. I discovered the cause of this was because the `CI.yml` file still had `master` in its build rules instead of `main`. And once I noticed that, I noticed there were a lot of other references to the main branch being called `master` in a lot of the documentation.

Thankfully within the documentation, GitHub was smart enough to automatically redirect all of the `master` URLs to `main`, so nothing visibly broke, but I definitely think we should update all of that. :)

I went through the entire repo and did a thorough audit in all of its text files, and updated the main branch name accordingly.

Reviewed By: DimaVartanian

Differential Revision: D42990133

fbshipit-source-id: d6b06c40b1b959990856b46b048895e3c55a9870
2023-02-08 18:34:25 -08:00
Lvv.me
0f9d8b8db2 Update CI Xcode version to 13.0 (#1536)
Summary:
## Changes in this pull request

- Update CI Xcode version to 13.0 for testing iOS 15 compatibility

### Checklist

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1536

Reviewed By: candance

Differential Revision: D31628765

Pulled By: lorixx

fbshipit-source-id: 1583cf0e1e8df524deede1204ce1430baa39262b
2021-10-14 08:47:56 -07:00
Lvv.me
2f37d18be3 Fix Carthage build issue (#1531)
Summary:
## Changes in this pull request

Issue fixed:
- Fix Carthage build issue.
- Remove useless Pod files.

### Checklist

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1531

Reviewed By: Ziewvater

Differential Revision: D31192872

Pulled By: lorixx

fbshipit-source-id: f0aa6fa1a9b3550c352cc15433f8a2a24551bc4c
2021-09-30 16:04:18 -07:00
3a4oT
a1036e06e3 SPM number10 (#1487)
Summary:
## Changes in this pull request

 A better version of https://github.com/Instagram/IGListKit/issues/1465 =)

- SPM support with script-based generations.

- added macOS Catalyst support

 ### Generate SPM layout

1. From **project's root** run:

   `bash scripts/generate_spm_sources_layout.sh`

  2. Commit Changes

 Repeat those steps each time you delete/add the project's files. **Make sure** to have this CI step which will check that `generate_spm_sources_layout.sh` is not broken.

Issue fixed: https://github.com/Instagram/IGListKit/issues/1368 #1406

### Checklist

- [ ] All tests pass. Demo project builds and runs.
- [ ] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [ ] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1487

Reviewed By: DimaVartanian, candance

Differential Revision: D30428297

Pulled By: lorixx

fbshipit-source-id: 655291ff03445dec9b0b8cd97916f0c88207e9a7
2021-08-31 19:28:37 -07:00
3a4oT
cd0fe69983 Run tests from Xcode12. Github workflow (#1478)
Summary:
## Changes in this pull request

- set header `IGListAdapterUpdaterCompatible.h` to - public which fixed Xcode 12 unit test iOS build.
- include `IGListTransitionData.m` to tvOS trget which fixed Xcode 12 tvOS framework build.
- Added GitHub workflow `CI`.

### Checklist

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [ ] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)

Pull Request resolved: https://github.com/Instagram/IGListKit/pull/1478

Reviewed By: candance

Differential Revision: D25504500

Pulled By: lorixx

fbshipit-source-id: 91f477838f176f662dd74928b75df670a4106968
2021-08-16 13:36:42 -07:00
Ryan Nystrom
4387a488e8 Update issue template to ask for example project
Summary: Frequently my first response to new issues. Codifying as part of new issue flow.

Reviewed By: maxoll

Differential Revision: D12839035

fbshipit-source-id: 81a907cd93c2d53e95d6f806242a06cc56368d6a
2018-12-07 15:12:26 -08:00
Jesse Squires
f01594005f Update ISSUE_TEMPLATE.md
Summary:
close #701
Closes https://github.com/Instagram/IGListKit/pull/702

Reviewed By: rnystrom

Differential Revision: D4947884

Pulled By: jessesquires

fbshipit-source-id: 597a8fe21bb8870b8260d10e03bab14651279fe5
2017-04-26 13:17:23 -07:00
Jesse Squires
a98c4ff252 Updates to the Contributing.md file.
Summary:
Issue fixed: #473

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I added an entry to the `CHANGELOG.md` for any breaking changes, enhancements, or bug fixes.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/558

Differential Revision: D4797501

Pulled By: jessesquires

fbshipit-source-id: e197283f30781017e6fd76a6c604599a4f480e69
2017-03-29 13:47:18 -07:00
Jesse Squires
1caf67660e Update PULL_REQUEST_TEMPLATE.md
Summary:
improve the template
Closes https://github.com/Instagram/IGListKit/pull/493

Differential Revision: D4568150

Pulled By: jessesquires

fbshipit-source-id: 1d563f5c643fd7529bedf14f1368a727fcdc6e93
2017-02-15 16:32:32 -08:00
Jesse Squires
c6b65cfb8b Create RELEASE_CHECKLIST.md
Summary:
Probably a good idea to document this. 😄

Easy for new contributors to forget steps.

Putting in `.github/` so it doesn't clutter top-level dir.
Closes https://github.com/Instagram/IGListKit/pull/366

Differential Revision: D4365951

Pulled By: jessesquires

fbshipit-source-id: 63a135be0875d7cbd415586ed15c28353da25b9e
2016-12-23 13:44:00 -08:00
Jesse Squires
f896a8b187 Update CONTRIBUTING.md
Summary: Closes https://github.com/Instagram/IGListKit/pull/367

Differential Revision: D4365950

Pulled By: jessesquires

fbshipit-source-id: eb364ab216570ad485af804b88f5680811bbc19c
2016-12-23 13:44:00 -08:00
Ryan Nystrom
917acb8da8 Add changelog to PR template
Summary:
If anything will help me remember.
Closes https://github.com/Instagram/IGListKit/pull/359

Differential Revision: D4365179

Pulled By: jessesquires

fbshipit-source-id: e002bc6bc31f8d2af59a5d5303a2c5cb09d780b6
2016-12-22 19:44:31 -08:00
Jesse Squires
efca5a7c54 Fix broken links, fix travis
Summary:
Caught by travis.
https://travis-ci.org/Instagram/IGListKit/jobs/185367790

Many thanks to Sherlouk for setting this up. 💯
Closes https://github.com/Instagram/IGListKit/pull/344

Differential Revision: D4351406

Pulled By: jessesquires

fbshipit-source-id: 385a3c5d738b1576a95812b9e4c598ea25773a78
2016-12-19 23:44:20 -08:00
Anton Sotkov
f1a1b941d0 Fixed link to contributing in pull request template
Summary:
Updated link for changes from e207ae52bf.

- [x] All tests pass. Demo project builds and runs.
- [x] I added tests, an experiment, or detailed why my change isn't tested.
- [x] I have reviewed the [contributing guide](https://github.com/Instagram/IGListKit/blob/master/.github/CONTRIBUTING.md)
Closes https://github.com/Instagram/IGListKit/pull/249

Differential Revision: D4220005

Pulled By: rnystrom

fbshipit-source-id: 88561b6d9afaeb5551f26278824ad4cfcf22e728
2016-11-22 06:29:01 -08:00
Jesse Squires
e207ae52bf Move contributing.md to .github. Close #114
Summary:
Move contributing.md to .github. Close #114
Closes https://github.com/Instagram/IGListKit/pull/136

Differential Revision: D4101580

Pulled By: rnystrom

fbshipit-source-id: b54cc9b0fe97b58bfd3914e7cc36859cadcbc0b7
2016-10-29 14:44:11 -07:00
Jesse Squires
9d4e85ab80 Update ISSUE_TEMPLATE.md
Summary:
Added IGListKit name, xcode, and CocoaPods/Carthage version
Closes https://github.com/Instagram/IGListKit/pull/119

Differential Revision: D4076643

Pulled By: rnystrom

fbshipit-source-id: 6e31f8a38a92b35bed59e8cc05439b1533b881c7
2016-10-25 13:29:09 -07:00
FBShipIt
cdc796746a Initial commit
fbshipit-source-id: c38b897b9e2b87c782e0e01b0145d9189dc7f9d8
2016-10-11 10:12:17 -04:00