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

Ubuntu support #5

Open
gnysek opened this issue Oct 22, 2024 · 3 comments
Open

Ubuntu support #5

gnysek opened this issue Oct 22, 2024 · 3 comments

Comments

@gnysek
Copy link

gnysek commented Oct 22, 2024

By changing:

modules = ["android"];

to:

modules = ["android", "linux"];

in https://github.com/bscotch/igor-setup/blob/main/src/lib/igor-setup.ts#L182

I was able to make a build for Ubuntu, with below nearly-basic config (notice platform: linux, also "find" part is same as for android):

name: Ubuntu Build (VM)
on: 
  # push: #Uncomment this line to run the workflow on push
  workflow_dispatch: #This line allows you to run the workflow manually from the GitHub Actions page
  workflow_call: #This line allows you to run the workflow from another workflow
jobs:
  build:
    runs-on: ubuntu-24.04
    steps:
      # Check out the repository with the GameMaker project
      - uses: actions/checkout@v4
        with:
          lfs: true
      # This step finds the yyp file in the repository and saves the path to an output
      - id: find_yyp
        name: Find the yyp file
        run: |
          yyp=$(find ${{ github.workspace }} -name "*.yyp")
          echo "YYP file found at: $yyp"
          echo "yyp-path=$yyp" >> $GITHUB_OUTPUT
      - name: Set up ffmpeg # This step may be removed when https://github.com/YoYoGames/GameMaker-Bugs/issues/4977 is fixed
        uses: FedericoCarboni/setup-ffmpeg@v3
        with:
          ffmpeg-version: '6.1.0'
      # This step sets up the GameMaker build CLI tool Igor https://github.com/bscotch/igor-setup
      - name: use Igor Setup
        uses: bscotch/igor-setup@v1
        id: igor
        with:
          target-yyp: ${{ steps.find_yyp.outputs.yyp-path }}
          access-key: ${{ secrets.ACCESS_KEY }}
          module: linux
      - name: use Igor build
        uses: bscotch/igor-build@v1
        id: build
        with:
          yyp-path: ${{ steps.find_yyp.outputs.yyp-path }}
          user-dir: ${{ steps.igor.outputs.user-dir }}
          platform: linux
          yyc: false
      # This step uploads the build to the artifacts, so you can download it from the GitHub Actions page or use it in another workflow
      - name: upload-build
        uses: actions/upload-artifact@v4
        with:
          name: igor-build-ubuntu
          path: ${{ steps.build.outputs.out-dir }}
          retention-days: 1 # Longer retention days can incur additional charges. See https://docs.github.com/en/actions/using-workflows/storing-workflow-data-as-artifacts

However, I'm not good enough to fully understand how those scripts works, and how to separate android/ubuntu builds.

I've checked it on runtime 2024.1100.0.658:
obraz

If someone with bigger knowledge would be able to adapt some better solution (so android/linux would be properly differetiated, and won't cause downloading both runtimes), that would be useful for others.

For now I'm at least sharing, that it's possible :)

@shichen85
Copy link
Member

Interesting... I don't think changing https://github.com/bscotch/igor-setup/blob/main/src/lib/igor-setup.ts#L182 is needed, because if you ended up specifying module: linux when calling bscotch/igor-setup@v1, it should circumvent line 173-185.

You workflow shows that you are still using bscotch/igor-setup@v1, which does not contains the alteration you mentioned. If that succeeded in making the ubuntu build, it means igor-setup and igor-build can already support Ubuntu as they are now. Just to confirm, can you link the workflow run that successfully made the Ubuntu build?

@gnysek
Copy link
Author

gnysek commented Oct 23, 2024

@shichen85 yes, of course as I mentioned, I had to change that one line, so instead of bscotch/igor-setup@v1 I've used my own version gnysel/igor-setup@ubuntu-hack ( gnysek@12f8494?w=1#diff-3d2b59189eeedc2d428ddd632e97658fe310f587f7cb63b01f9b98ffc11c0197L13373 ).

@shichen85
Copy link
Member

I found the issue. In your workflow YML file:

      - name: use Igor Setup
        uses: bscotch/igor-setup@v1
        id: igor
        with:
          target-yyp: ${{ steps.find_yyp.outputs.yyp-path }}
          access-key: ${{ secrets.ACCESS_KEY }}
          module: linux

It uses the singular module instead of the plural modules. If you change that to modules, you should be able to make the build even with bscotch/igor-setup@v1.
This is a very understandable "typo", and I have updated the action to take the singular module as an input too.
Unfortunately, only VM can build now and YYC is throwing errors as shown here: https://github.com/bscotch/ganary/actions/runs/11487501182/job/31972198523

We do not ship to Ubuntu so I will leave this issue open for PRs from the community.

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