Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

빌드 스크립트 #18

Closed
6 of 8 tasks
x-0o0 opened this issue Sep 16, 2023 · 4 comments · Fixed by #42
Closed
6 of 8 tasks

빌드 스크립트 #18

x-0o0 opened this issue Sep 16, 2023 · 4 comments · Fixed by #42
Assignees
Labels
자동화 CI/CD 관련 작업 또는 깃헙 액션 등을 사용한 자동화 기능

Comments

@x-0o0
Copy link
Contributor

x-0o0 commented Sep 16, 2023

개요

빌드가 되는 유효한 코드가 머지될 수 있도록 다음의 빌드 스크립트가 필요함

  • KuringApp
  • KuringModulePackage 의 각 라이브러리

고려사항

체크항목

  • 패키지 빌드 성공여부 체크

  • iOS 최소 버전에서 앱 타겟 빌드 성공 여부 체크

  • iOS 최신 버전에서 앱 타겟 빌드 성공 여부 체크

  • 앱 테스트 성공 여부 체크

  • 패키지 테스트 성공 여부 체크

효율

  • KuringModulePackage 의 모든 라이브러리를 빌드하는 것이 아닌
    수정이 있는 라이브러리만 빌드할 수 있도록
  • 불필요하게 깃헙 액션 사용시간이 소모되는 것을 방지하기 위해 커멘트로 트리거 하도록 수정
  • 2approval 없어도 머지하는 테스트 추가 (간단한 변경사항의 경우 불필요한 시간닝비를 막기위함)

트리거 명령어

  • /쿠링 ios17 앱 빌드
  • /쿠링 패키지 빌드
  • /테스트
  • /전부 체크
  • /쿠링 머지

추가 사용법

  • /쿠링 패키지 빌드하고 머지
  • /쿠링 ios17 앱 빌드하고 머지
@x-0o0 x-0o0 added the 자동화 CI/CD 관련 작업 또는 깃헙 액션 등을 사용한 자동화 기능 label Sep 16, 2023
@x-0o0 x-0o0 linked a pull request Oct 6, 2023 that will close this issue
2 tasks
@x-0o0
Copy link
Contributor Author

x-0o0 commented Oct 8, 2023

커멘트로 깃헙 액션 작동시키는 스크립트 작성은

cozzin 님이 작성한 블로그 포스트

https://medium.com/@hongseongho/github-action으로-comment-bot-만들기-422e6e471c8e

에 잘 정리되어있음

@x-0o0
Copy link
Contributor Author

x-0o0 commented Oct 8, 2023

마주한 문제:

문제 요약

분명 스크립트는 잘 작성했는데 커멘트로 트리거가 되지 않는 현상이 있었다.

원인

"Note: This event will only trigger a workflow run if the workflow file is on the default branch."
출처 | docs.github.com

issue-comment 트리거는 default branch 기반으로 돌아가기 때문에 아직 yaml 파일이 default branch 에 머지되지 않은 시점에서 issue-comment 트리거 시도를 해도 default branch 에는 트리거할 액션이 정의되어 있지 않아서 동작하지 않았다.

해결방안

테스트 할때는 PR 브랜치로 default branch를 임시로 변경하고, 확인이 끝나면 팀원들에게 공유 후 default branch 복구

@x-0o0
Copy link
Contributor Author

x-0o0 commented Oct 8, 2023

마주한 문제

문제 요약

스크립트에 테스트가 최신 Xcode 버전에서 돌아가도록 작성했는데, Xcode15 가 아닌, Xcode14.2 (심지어 14.3 도 아님) 으로 돌아가는 문제가 있었다.

원인

macos-latest 를 사용하는 경우 맥OS 에 Applications 폴더에는 Xcode_14.2.app 까지만 설치 되어있다.

해결 방안

Looks like you need to use macos-13, not macos-latest.
link

build:
-  runs-on: macOS-latest
+  runs-on: macos-15
    steps:
      - name: Setup Xcode version
        uses: maxim-lobanov/setup-xcode@v1
        with:
          xcode-version: '15.0'

@x-0o0 x-0o0 self-assigned this Oct 9, 2023
@x-0o0
Copy link
Contributor Author

x-0o0 commented Oct 10, 2023

마주한 문제

정보 이 문제는 known-issue 테크뎁으로 둡니다.

문제 요약

Tests must be run on a concrete device

원인

#Preview 매크로 빌드를 위해 Xcode15 환경이 필요. 하지만 시뮬레이터 버전이 iOS 17 만 있음. (xcrun xctrace list devices)
시뮬을 설치하는 방법이 있으나 소모시간 너무 길고, 특히 macOS 는 깃헙 액션 사용시간이 몇배수로 적용되기 때문에 (3이었나 10이었나...)
최선의 방법은 아닌 것 같음

@x-0o0 x-0o0 closed this as completed in #42 Oct 11, 2023
@ku-ring ku-ring locked and limited conversation to collaborators Oct 13, 2023
@x-0o0 x-0o0 converted this issue into discussion #56 Oct 13, 2023

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
자동화 CI/CD 관련 작업 또는 깃헙 액션 등을 사용한 자동화 기능
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant