Giter VIP home page Giter VIP logo

Comments (8)

Kyle-Ye avatar Kyle-Ye commented on June 14, 2024 1

ok,我先来试一下。

Most of my macOS project's CI is using Xcode Cloud. See I can't find a reference workflow file for you.

Here is a iOS one in case you need something for reference.

https://github.com/OpenSwiftUIProject/OpenSwiftUI/blob/9783793fc16cabb1b810a09f94f4faad2e00d7d7/.github/workflows/ios.yml#L10-L33

from easydict.

tisfeng avatar tisfeng commented on June 14, 2024

@Kyle-Ye 有空可以帮忙看看这个问题吗

from easydict.

Kyle-Ye avatar Kyle-Ye commented on June 14, 2024
  1. The log has showed the error reason
image image
2023-12-31T02:28:35.9085640Z /Users/runner/work/Easydict/Easydict/Easydict/NewApp/View/MenuItemView.swift:92:1: error: expected expression
2023-12-31T02:28:35.9087060Z @available(macOS 13, *)
2023-12-31T02:28:35.9087490Z ^
2023-12-31T02:28:35.9088790Z /Users/runner/work/Easydict/Easydict/Easydict/NewApp/View/SettingView/Tabs/GeneralTab.swift:53:1: error: expected expression
2023-12-31T02:28:35.9090350Z @available(macOS 13, *)
2023-12-31T02:28:35.9090770Z ^
2023-12-31T02:28:35.9092030Z /Users/runner/work/Easydict/Easydict/Easydict/NewApp/View/SettingView/Tabs/AboutTab.swift:59:1: error: expected expression
2023-12-31T02:28:35.9093540Z @available(macOS 13, *)
2023-12-31T02:28:35.9093960Z ^
2023-12-31T02:28:35.9095680Z /Users/runner/work/Easydict/Easydict/Easydict/NewApp/View/MenuItemView.swift:66:13: error: cannot find 'SettingsLink' in scope
2023-12-31T02:28:35.9097250Z             SettingsLink()
2023-12-31T02:28:35.9097690Z             ^~~~~~~~~~~~
2023-12-31T02:28:35.9097980Z 

I believe this is because the CI is using Xcode_14.2.

And after #212, the minimal supported version to build the project is Xcode 15.0.

We can probably solve the issue by upgrading the CI's Xcode version.

  1. Maybe we can learn this as a lesson. Even the owner should not push code to protected branch(eg. dev) and a merge request and CI check is needed.
image

from easydict.

tisfeng avatar tisfeng commented on June 14, 2024

目前项目使用的是 GitHub 仓库设置中的 CodeQL,我从 action 市场这里的配置文件看到已经是 macos-latest,也就是说是 macOS 13,那这里还能改吗?

https://github.com/tisfeng/Easydict/new/main?filename=.github%2Fworkflows%2Fcodeql.yml&workflow_template=code-scanning%2Fcodeql

    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}

from easydict.

Kyle-Ye avatar Kyle-Ye commented on June 14, 2024

You may try to specify Xcode version to 15.0 and give it a try.

Also I noticing you are adding swift.yml workflow for swift build.

This will not work since the EasyDict project is a xcodeproj not a swift package.

For a Swift package, both swift build and xcodebuild is supported.
For a xcodeproje/xcodeworkspace, you still need to use xcodebuild manully.

  1. The easiest way to add such CI is by Xcode Cloud and Apple's Xcode Cloud team will take care of it. All you need to do is give Xcode Cloud the repo's read permission.
image

https://github.com/Kyle-Ye/MenuHelper

  1. Otherwise you need to explore the xcodebuild command, and run it in a GitHub workflow file

eg.

xcodebuild build \
            -scheme OpenSwiftUI \
            -configuration Debug \
            -skipMacroValidation -skipPackagePluginValidation \
            -destination "platform=iOS-Simulator" \

from easydict.

Kyle-Ye avatar Kyle-Ye commented on June 14, 2024

目前项目使用的是 GitHub 仓库设置中的 CodeQL,我从 action 市场这里的配置文件看到已经是 macos-latest,也就是说是 macOS 13,那这里还能改吗?

tisfeng/Easydict/new/main?filename=.github%2Fworkflows%2Fcodeql.yml&workflow_template=code-scanning%2Fcodeql

    runs-on: ${{ (matrix.language == 'swift' && 'macos-latest') || 'ubuntu-latest' }}

Every macOS runner image have a default Xcode version. And it will bundle a lot of different Xcode version.

See more info here https://github.com/actions/runner-images/blob/main/images/macos/macos-13-Readme.md

In our case, we need to manually update the default Xcode version. You can do it by hand or using a Xcode action.(eg. https://github.com/maxim-lobanov/setup-xcode)

from easydict.

tisfeng avatar tisfeng commented on June 14, 2024

ok,我先来试一下。

from easydict.

tisfeng avatar tisfeng commented on June 14, 2024

CodeQL 已经修复了,通过指定 Runner Image 为 macos-13 和设置 xcode-version: '15.1' https://github.com/tisfeng/Easydict/blob/main/.github/workflows/codeql.yml

之前没注意 macos-latest 居然是 macos-12,这太坑了 🥲

Runner Image
  Image: macos-12
  Version: 20231216.1
  Included Software: https://github.com/actions/runner-images/blob/macOS-12/20231216.1/images/macos/macos-12-Readme.md
  Image Release: https://github.com/actions/runner-images/releases/tag/macOS-12%2F20231216.1

from easydict.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.