firebird icon indicating copy to clipboard operation
firebird copied to clipboard

[Android] Enable LTO

Open Vogtinator opened this issue 1 year ago • 10 comments

On armeabi-v7a it's broken in two ways. Also simplify the LTCG determination code and print the result.

Depends on #285

Vogtinator avatar Oct 19 '22 17:10 Vogtinator

@adriweb Looks like the case without HAVE_SECRETS isn't working

Vogtinator avatar Dec 05 '22 08:12 Vogtinator

@adriweb Looks like the case without HAVE_SECRETS isn't working

Indeed... How does that not work, though? We see HAVE_SECRETS: false in the env dump, and it has an if ${{ env.HAVE_SECRETS == 'true' }} ...

adriweb avatar Dec 05 '22 08:12 adriweb

@adriweb Looks like the case without HAVE_SECRETS isn't working

Indeed... How does that not work, though? We see HAVE_SECRETS: false in the env dump, and it has an if ${{ env.HAVE_SECRETS == 'true' }} ...

Maybe just if: runner.os == 'macOS' && github.repository == 'nspire-emus/firebird' && env.HAVE_SECRETS == 'true' ?

Vogtinator avatar Dec 05 '22 08:12 Vogtinator

I'll try, but the original version was a copy paste from some big repo CI that seemingly worked heh

adriweb avatar Dec 05 '22 08:12 adriweb

Apparently secrets are not available in if, maybe env isn't available either? https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#example-using-secrets

Vogtinator avatar Dec 05 '22 08:12 Vogtinator

well apparently it's because secrets aren't available in if that the intermediate "putting the boolean value in env" step is required for the check, but...

adriweb avatar Dec 05 '22 08:12 adriweb

My assumption would be that env is computed only when a step is run, but if has to be computed much earlier than that to determine whether to run the step at all.

Vogtinator avatar Dec 05 '22 08:12 Vogtinator

My assumption would be that env is computed only when a step is run, but if has to be computed much earlier than that to determine whether to run the step at all.

Well the docs about that say it should be fine: "You can use a context in an if conditional statement to access the value of an environment variable." And the syntax i their example is if: ${{ env.DAY_OF_WEEK == 'Monday' }} which is what I also do: if: ... && ${{ env.HAVE_SECRETS == 'true' }}

So... wut ?

Edit: maybe it's a syntax thing and ${{ .. }} should wrap the whole expression ; I'll try that

adriweb avatar Dec 05 '22 14:12 adriweb

Edit: maybe it's a syntax thing and ${{ .. }} should wrap the whole expression ; I'll try that

That was my first guess as well, the if is implicitly wrapped in ${{}} already and nesting that might not work.

Vogtinator avatar Dec 05 '22 14:12 Vogtinator

I'll let you rebase and see if it works now 🤷‍♂️

adriweb avatar Dec 05 '22 14:12 adriweb