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

[stable] Upgrade CI configuration following macOS-11 deprecation #2933

Merged
merged 2 commits into from
Jun 22, 2024

Conversation

Geod24
Copy link
Member

@Geod24 Geod24 commented Jun 17, 2024

macOS-11 is going away at the end of June.

Copy link

github-actions bot commented Jun 17, 2024

✅ PR OK, no changes in deprecations or warnings

Total deprecations: 0

Total warnings: 0

Build statistics:

 statistics (-before, +after)
 executable size=5242696 bin/dub
-rough build time=60s
+rough build time=61s
Full build output
DUB version 1.37.0, built on May 11 2024
LDC - the LLVM D compiler (1.38.0):
  based on DMD v2.108.1 and LLVM 18.1.5
  built with LDC - the LLVM D compiler (1.38.0)
  Default target: x86_64-unknown-linux-gnu
  Host CPU: znver3
  http://dlang.org - http://wiki.dlang.org/LDC


  Registered Targets:
    aarch64     - AArch64 (little endian)
    aarch64_32  - AArch64 (little endian ILP32)
    aarch64_be  - AArch64 (big endian)
    amdgcn      - AMD GCN GPUs
    arm         - ARM
    arm64       - ARM64 (little endian)
    arm64_32    - ARM64 (little endian ILP32)
    armeb       - ARM (big endian)
    avr         - Atmel AVR Microcontroller
    bpf         - BPF (host endian)
    bpfeb       - BPF (big endian)
    bpfel       - BPF (little endian)
    hexagon     - Hexagon
    lanai       - Lanai
    loongarch32 - 32-bit LoongArch
    loongarch64 - 64-bit LoongArch
    mips        - MIPS (32-bit big endian)
    mips64      - MIPS (64-bit big endian)
    mips64el    - MIPS (64-bit little endian)
    mipsel      - MIPS (32-bit little endian)
    msp430      - MSP430 [experimental]
    nvptx       - NVIDIA PTX 32-bit
    nvptx64     - NVIDIA PTX 64-bit
    ppc32       - PowerPC 32
    ppc32le     - PowerPC 32 LE
    ppc64       - PowerPC 64
    ppc64le     - PowerPC 64 LE
    r600        - AMD GPUs HD2XXX-HD6XXX
    riscv32     - 32-bit RISC-V
    riscv64     - 64-bit RISC-V
    sparc       - Sparc
    sparcel     - Sparc LE
    sparcv9     - Sparc V9
    spirv       - SPIR-V Logical
    spirv32     - SPIR-V 32-bit
    spirv64     - SPIR-V 64-bit
    systemz     - SystemZ
    thumb       - Thumb
    thumbeb     - Thumb (big endian)
    ve          - VE
    wasm32      - WebAssembly 32-bit
    wasm64      - WebAssembly 64-bit
    x86         - 32-bit X86: Pentium-Pro and above
    x86-64      - 64-bit X86: EM64T and AMD64
    xcore       - XCore
   Upgrading project in /home/runner/work/dub/dub/
    Starting Performing "release" build using /opt/hostedtoolcache/dc/ldc2-1.38.0/x64/ldc2-1.38.0-linux-x86_64/bin/ldc2 for x86_64.
    Building dub 1.38.1-rc.1+commit.3.g9c83a7d7: building configuration [application]
     Linking dub
STAT:statistics (-before, +after)
STAT:executable size=5242696 bin/dub
STAT:rough build time=61s

@Geod24 Geod24 changed the title Upgrade macOS job from 11 to 12 [stable] Upgrade CI configuration following macOS-11 deprecation Jun 17, 2024
@Geod24 Geod24 force-pushed the mlang/CI branch 2 times, most recently from c00fb9c to ec8b58f Compare June 17, 2024 14:58
@Geod24
Copy link
Member Author

Geod24 commented Jun 18, 2024

[INFO] Running /Users/runner/work/dub/dub/test/issue2377-dynLib-dep-extra-files.script.d...
    Starting Performing "debug" build using dmd for x86_64.
    Building dep2 ~master: building configuration [dynlib]
     Linking dep2
    Building dep1 ~master: building configuration [dynlib]
     Linking dep1
    Building parent ~master: building configuration [dynlib]
     Linking parent
    Starting Performing "debug" build using dmd for x86_64.
    Building dep2 ~master: building configuration [library]
    Building dep1 ~master: building configuration [library]
    Building parent ~master: building configuration [dynlib_static]
     Linking parent
    Starting Performing "debug" build using dmd for x86_64.
    Building dep2 ~master: building configuration [library]
    Building dep1 ~master: building configuration [library]
    Building parent ~master: building configuration [exe_static]
     Linking parent
    Starting Performing "debug" build using dmd for x86_64.
  Up-to-date dep2 ~master: target for configuration [dynlib] is up to date.
  Up-to-date dep1 ~master: target for configuration [dynlib] is up to date.
    Building parent ~master: building configuration [exe_dynamic]
     Linking parent
    Finished To force a rebuild of up-to-date targets, run again with --force
dyld[9574]: Library not loaded: '@rpath/libdep1.dylib'
  Referenced from: '/Users/runner/work/dub/dub/test/issue2377-dynLib-dep-extra-files/parent/output/exe_dynamic/parent'
  Reason: tried: '/usr/local/lib/libdep1.dylib' (no such file), '/usr/lib/libdep1.dylib' (no such file)
object.Exception@test/issue2377-dynLib-dep-extra-files.script.d(110): command 'LD_LIBRARY_PATH=".:${LD_LIBRARY_PATH:-}" ./parent' failed
----------------
/Users/runner/hostedtoolcache/dc/dmd-2.109.0/x64/dmd2/osx/bin/../../src/phobos/std/exception.d:521 pure @safe noreturn std.exception.bailOut!(Exception).bailOut(immutable(char)[], ulong, scope const(char)[]) [0x10e4395fb]
/Users/runner/hostedtoolcache/dc/dmd-2.109.0/x64/dmd2/osx/bin/../../src/phobos/std/exception.d:442 pure @safe bool std.exception.enforce!().enforce!(bool).enforce(bool, lazy const(char)[], immutable(char)[], ulong) [0x10e439576]
/Users/runner/work/dub/dub/test/issue2377-dynLib-dep-extra-files.script.d:110 void issue2377_dynlib_dep_extra_files.script.run(immutable(char)[]) [0x10e438de7]
/Users/runner/work/dub/dub/test/issue2377-dynLib-dep-extra-files.script.d:81 _Dmain [0x10e438ae1]
Error Program exited with code 1
[ERROR] Script failure.

@jacob-carlborg : Any chance you could take a look ? I don't have a Macbook anymore so I haven't kept on top of things. I'm mostly concerned about whether there's a bugfix needed in Dub or the test just need to be adjusted ?

@jacob-carlborg
Copy link
Contributor

@Geod24 I can take a quick look, but I'm lazy. How do I run the tests?

@Geod24
Copy link
Member Author

Geod24 commented Jun 19, 2024

This is what we do on POSIX:

- name: '[POSIX] Test'
if: runner.os != 'Windows'
env:
COVERAGE: true
run: |
dub build --compiler=${{ env.DC }}
if [[ ${{ matrix.do_test }} == 'true' ]]; then
dub run --compiler=${{ env.DC }} --single test/issue2051_running_unittests_from_dub_single_file_packages_fails.d
./scripts/ci/ci.sh
fi

In particular, ./scripts/ci/ci.sh.

@jacob-carlborg
Copy link
Contributor

@Geod24 I gave it a quick try, I can't easily get it to work. Probably because I have an Apple Silicon Mac. I'm not the only one with a Mac. Both @schveiguy and @thewilsonator are using Mac. At least the last time I met them. I'm sure there are others as well. Alternatively you can use this action [1] to get a shell into the runner and debug it from there.

[1] https://github.com/mxschmitt/action-tmate

@Geod24 Geod24 force-pushed the mlang/CI branch 2 times, most recently from 59bef04 to 0bdb9a7 Compare June 21, 2024 23:03
@Geod24
Copy link
Member Author

Geod24 commented Jun 22, 2024

Long story short: install_name_tool -add_rpath [@executable_path](http://twitter.com/executable_path) parent
Source: https://medium.com/@donblas/fun-with-rpath-otool-and-install-name-tool-e3e41ae86172

@Geod24 Geod24 force-pushed the mlang/CI branch 3 times, most recently from 842c542 to 7fde489 Compare June 22, 2024 00:56
macOS-11 is going away at the end of June.
As a consequence, we upgrade to macOS-12, upgrade the supported
frontend versions, and add some arm64 tests to prepare for
future upgrades.
@Geod24 Geod24 enabled auto-merge (rebase) June 22, 2024 02:01
@Geod24 Geod24 merged commit 1475c5a into dlang:stable Jun 22, 2024
31 checks passed
@jacob-carlborg
Copy link
Contributor

@Geod24 why not bump to macOS 13 while you're at it?

@Geod24
Copy link
Member Author

Geod24 commented Jun 22, 2024

We test (and release) on the oldest available runner. My understanding is that you can run a macOS-12 binary on 13 but not the other way around unless you set the SDK version explicitly?

@jacob-carlborg
Copy link
Contributor

My understanding is that you can run a macOS-12 binary on 13 but not the other way around unless you set the SDK version explicitly?

Yes, that's correct. I would use the latest runner (latest for x86-64) and set the minimum deployment target. Then we're in control of which platforms we want to support. Also less often the runner version needs to be bumped. Set the MACOSX_DEPLOYMENT_TARGET environment variable to the oldest version of macOS you want to support.

@Geod24 Geod24 deleted the mlang/CI branch June 22, 2024 10:55
@Geod24
Copy link
Member Author

Geod24 commented Jun 22, 2024

macOS-14 is out so we could probably bump to that. I'll give it a shot in the not-so-distant future - this was really just a band-aid as we were hit by macOS-11 brownout when trying to merge other MRs.

@jacob-carlborg
Copy link
Contributor

The macOS-14 runner is ARM64 only, unless GitHub added x86-64 recently.

@jacob-carlborg
Copy link
Contributor

we were hit by macOS-11 brownout

Yeah, I've learned the hard way that, if you can, stay on *-latest and try not to depend on anything in the runner image.

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

Successfully merging this pull request may close these issues.

None yet

3 participants