ffi2: type consructors and type macros #2843
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: CI MacOS | |
| on: | |
| push: | |
| branches: | |
| - master | |
| permissions: | |
| contents: read | |
| jobs: | |
| # Build jobs | |
| # These jobs build each Racket component separately and tests on the component start as soon as each | |
| # component finishes building. | |
| build-racketcgc: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cify: [nocify] | |
| runs-on: macos-14 | |
| env: | |
| RACKET_EXTRA_CONFIGURE_ARGS: "" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - name: Setup cify if enabled1 | |
| if: matrix.cify == 'cify' | |
| run: echo "CIFY_OPTION=--enable-cify" >> $GITHUB_ENV | |
| - name: Setup cify if disabled | |
| if: matrix.cify == 'nocify' | |
| run: echo "CIFY_OPTION=--disable-cify" >> $GITHUB_ENV | |
| - name: Configuring Racket CGC | |
| working-directory: ./racket/src | |
| run: > | |
| ./configure | |
| --prefix=$GITHUB_WORKSPACE/racketcgc | |
| $RACKET_EXTRA_CONFIGURE_ARGS | |
| --enable-cgcdefault | |
| --enable-jit | |
| --enable-foreign | |
| --enable-macprefix | |
| --enable-places | |
| --enable-float | |
| $CIFY_OPTION | |
| --enable-pthread | |
| --disable-docs | |
| - name: Building | |
| working-directory: ./racket/src | |
| run: | | |
| export cpus=$(sysctl -n hw.physicalcpu) | |
| make CFLAGS="-Werror" -l $cpus -j $((cpus+1)) | |
| - name: Installing | |
| working-directory: ./racket/src | |
| run: make -j $((cpus+1)) install | |
| - name: Tarballing | |
| working-directory: ${{ github.workspace }} | |
| run: tar -cvjf racketcgc-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }}.tar.bz2 racketcgc | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: racketcgc-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }}/racketcgc-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }}.tar.bz2 | |
| build-racket3m: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cify: [nocify] | |
| runs-on: macos-14 | |
| needs: build-racketcgc | |
| env: | |
| RACKET_EXTRA_CONFIGURE_ARGS: "" | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - name: Setup cify if enabled | |
| if: matrix.cify == 'cify' | |
| run: echo "CIFY_OPTION=--enable-cify" >> $GITHUB_ENV | |
| - name: Setup cify if disabled | |
| if: matrix.cify == 'nocify' | |
| run: echo "CIFY_OPTION=--disable-cify" >> $GITHUB_ENV | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racketcgc-macos-nocify-aarch64_git${{ github.sha }} | |
| path: ${{ runner.temp }} | |
| - name: Untar | |
| working-directory: ${{ github.workspace }} | |
| run: tar -xvjf ${{ runner.temp }}/racketcgc-macos-nocify-aarch64_git${{ github.sha }}.tar.bz2 | |
| - name: Configuring Racket 3m | |
| working-directory: ./racket/src | |
| env: | |
| CC: clang | |
| run: > | |
| ./configure | |
| --prefix=$GITHUB_WORKSPACE/racket3m | |
| $RACKET_EXTRA_CONFIGURE_ARGS | |
| --enable-racket=$GITHUB_WORKSPACE/racketcgc/bin/racket | |
| --enable-bcdefault | |
| --enable-jit | |
| --enable-foreign | |
| --enable-macprefix | |
| --enable-places | |
| --enable-float | |
| --disable-docs | |
| $CIFY_OPTION | |
| --enable-pthread | |
| - name: Building | |
| working-directory: ./racket/src | |
| run: | | |
| export cpus=$(sysctl -n hw.physicalcpu) | |
| make CFLAGS="-Werror" -l $cpus -j $((cpus+1)) | |
| - name: Installing | |
| working-directory: ./racket/src | |
| run: make -j $((cpus+1)) install | |
| - name: Tarballing | |
| working-directory: ${{ github.workspace }} | |
| run: tar -cvjf racket3m-macos-${{ matrix.cify }}-aarch64_git${{ github.sha}}.tar.bz2 racket3m | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: racket3m-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }}/racket3m-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }}.tar.bz2 | |
| build-racketcs: | |
| runs-on: macos-14 | |
| needs: build-racketcgc | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 100 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racketcgc-macos-nocify-aarch64_git${{ github.sha }} | |
| path: ${{ runner.temp }} | |
| - name: Untar | |
| working-directory: ${{ github.workspace }} | |
| run: tar -xvjf ${{ runner.temp }}/racketcgc-macos-nocify-aarch64_git${{ github.sha}}.tar.bz2 | |
| - name: Configuring Racket CS | |
| working-directory: ./racket/src | |
| env: | |
| CC: ${{ matrix.cc }} | |
| run: > | |
| ./configure | |
| --prefix=$GITHUB_WORKSPACE/racketcs | |
| --enable-racket=$GITHUB_WORKSPACE/racketcgc/bin/racket | |
| --enable-macprefix | |
| --enable-compress | |
| --disable-docs | |
| --enable-pthread | |
| --enable-csdefault | |
| --enable-csonly | |
| - name: Building | |
| working-directory: ./racket/src | |
| run: | | |
| export cpus=$(sysctl -n hw.physicalcpu) | |
| make -l $cpus -j $((cpus+1)) | |
| - name: Installing | |
| working-directory: ./racket/src | |
| run: make -j $((cpus+1)) install | |
| - name: Copying src/ into distro # ChezScheme build is needed by build-ios | |
| run: cp -r racket/src racketcs/ | |
| - name: Tarballing | |
| working-directory: ${{ github.workspace }} | |
| run: tar -cvjf racketcs-macos-aarch64_git${{ github.sha}}.tar.bz2 racketcs | |
| - uses: actions/upload-artifact@v7 | |
| with: | |
| name: racketcs-macos-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }}/racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2 | |
| build-ios: | |
| runs-on: macos-14 | |
| needs: build-racketcs | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racketcs-macos-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }} | |
| - name: Untar host Racket | |
| run: | | |
| mkdir host-racket | |
| tar -xvjf racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2 -C host-racket --strip-components 1 | |
| - name: Build iOS Racket | |
| run: | | |
| set -euxo pipefail | |
| mkdir -p racket/src/build-ios | |
| pushd racket/src/build-ios | |
| ../configure \ | |
| --host=aarch64-apple-darwin \ | |
| --enable-ios=iPhoneOS \ | |
| --enable-racket=${{ github.workspace }}/host-racket/bin/racket \ | |
| --enable-scheme=${{ github.workspace }}/host-racket/src/cs/c | |
| make | |
| make install | |
| # Tests | |
| # Note: the reason we cannot transform this into a matrix build is | |
| # because we cannot use variables in the needs keyword. | |
| test-cgc: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cify: [nocify] | |
| runs-on: macos-14 | |
| needs: build-racketcgc | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racketcgc-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }} | |
| - name: Untar | |
| working-directory: ${{ github.workspace }} | |
| run: tar -xvjf racketcgc-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }}.tar.bz2 | |
| - name: Extend PATH with Racket executable | |
| working-directory: ${{ github.workspace }} | |
| run: echo "$PWD/racketcgc/bin" >> $GITHUB_PATH | |
| - name: Check for Racket | |
| run: racket --version | |
| - name: Install catalog | |
| run: | | |
| racket -l- pkg/dirs-catalog --immediate $PWD/rktcat $PWD/pkgs/ | |
| raco pkg config --set catalogs $PWD/rktcat/ https://pkgs.racket-lang.org https://planet-compats.racket-lang.org | |
| - name: Test | |
| run: bash .github/scripts/run-racket-tests.sh | |
| test-3m: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| cify: [nocify] | |
| runs-on: macos-14 | |
| needs: build-racket3m | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racket3m-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }} | |
| - name: Untar | |
| working-directory: ${{ github.workspace }} | |
| run: tar -xvjf racket3m-macos-${{ matrix.cify }}-aarch64_git${{ github.sha }}.tar.bz2 | |
| - name: Extend PATH with Racket executable | |
| working-directory: ${{ github.workspace }} | |
| run: echo "$PWD/racket3m/bin" >> $GITHUB_PATH | |
| - name: Check for Racket | |
| run: racket --version | |
| - name: Install catalog and required packages | |
| run: | | |
| racket -l- pkg/dirs-catalog --immediate $PWD/rktcat $PWD/pkgs/ | |
| raco pkg config --set catalogs $PWD/rktcat/ https://pkgs.racket-lang.org https://planet-compats.racket-lang.org | |
| - name: Test | |
| run: bash .github/scripts/run-racket-tests.sh | |
| test-cs: | |
| runs-on: macos-14 | |
| needs: build-racketcs | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/download-artifact@v8 | |
| with: | |
| name: racketcs-macos-aarch64_git${{ github.sha }} | |
| path: ${{ github.workspace }} | |
| - name: Untar | |
| working-directory: ${{ github.workspace }} | |
| run: tar -xvjf racketcs-macos-aarch64_git${{ github.sha }}.tar.bz2 | |
| - name: Extend PATH with Racket executable | |
| working-directory: ${{ github.workspace }} | |
| run: echo "$PWD/racketcs/bin" >> $GITHUB_PATH | |
| - name: Check for Racket | |
| run: racket --version | |
| - name: Install catalog and required packages | |
| run: | | |
| racket -l- pkg/dirs-catalog --immediate $PWD/rktcat $PWD/pkgs/ | |
| raco pkg config --set catalogs $PWD/rktcat/ https://pkgs.racket-lang.org https://planet-compats.racket-lang.org | |
| - name: Test | |
| run: bash .github/scripts/run-racket-tests.sh |