Skip to content
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

install ninja to setup environment? #49

Closed
liudonghua123 opened this issue Jun 18, 2020 · 2 comments
Closed

install ninja to setup environment? #49

liudonghua123 opened this issue Jun 18, 2020 · 2 comments

Comments

@liudonghua123
Copy link

I used this github action a lot, but recently when I build linux packages, it always failed with CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set., see flutter/flutter#59750 for more details.
It seems lack of ninja, could you install ninja by default in order for building linux packages.

@liudonghua123
Copy link
Author

Finally, I can add a step like the following to make it work for linux package.


      - name: Patch for linux build
        run: |
          flutter doctor
          sudo apt-get update -y
          sudo apt-get install -y ninja-build libgtk-3-dev
          flutter doctor

@Merrit
Copy link

Merrit commented Feb 18, 2021

I also had to add libblkid-dev before it would work, which looked like this:

  - run: sudo apt-get update -y
  - run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev

Here is my entire workflow.yml for reference:

name: Check Linux build succeeds on PR
'on': pull_request
jobs:
  build_and_preview:
    runs-on: ubuntu-latest
    steps:
      - run: sudo apt-get update -y
      - run: sudo apt-get install -y ninja-build libgtk-3-dev libblkid-dev
      - uses: actions/checkout@v2
      - uses: subosito/flutter-action@v1.4.0
        with:
          channel: dev
      - run: flutter config --enable-linux-desktop
      - run: flutter pub get
      - run: flutter build linux

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants