diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index b667f0f55..b725b2017 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -42,6 +42,19 @@ jobs: - name: Clone repo uses: actions/checkout@v3 + - name: Build tinitex via cmd + run: | + git clone --depth=1 https://github.com/quarto-dev/quarto-cli quarto-cli2 + cd quarto-cli2 + .\configure.cmd + package/dist/bin/quarto.cmd check + pwd + cd package/src + .\quarto-bld.cmd compile-quarto-latexmk --target x86_64-pc-windows-msvc --name tinitex + tree ..\dist\bin /f /a + cd ..\dist\bin\tinitex\x86_64-pc-windows-msvc + .\tinitex.exe --help + - name: Install Pandoc uses: r-lib/actions/setup-pandoc@v2 with: @@ -53,6 +66,9 @@ jobs: r-version: release use-public-rspm: true + - name: Build tinitex + run: Rscript tools/build-tinitex.R + - name: Install tinytex package and its deps uses: r-lib/actions/setup-r-dependencies@v2 with: @@ -94,9 +110,6 @@ jobs: run: tools\\install-bin-windows.bat shell: cmd - - name: Build tinitex - run: Rscript tools/build-tinitex.R - - run: dir . - name: Upload bundles diff --git a/tools/build-tinitex.R b/tools/build-tinitex.R index 7d1253e80..c7817cdd2 100644 --- a/tools/build-tinitex.R +++ b/tools/build-tinitex.R @@ -4,7 +4,7 @@ setwd('quarto-cli') os = if (.Platform$OS.type == 'windows') 1 else if (Sys.info()['sysname'] == 'Darwin') 2 else 3 -system2(c('configure.cmd', rep('./configure.sh', 2))[os]) +if (os == 1) shell('configure.cmd') else system('./configure.sh') setwd('package/src') system2( @@ -24,6 +24,7 @@ gzip_file = function(tf, f) { } b = list.files('../dist/bin/tinitex', '^tinitex([.]exe)?$', full.names = TRUE, recursive = TRUE) +if (length(b) == 0) stop('Failed to build tinitex') message('tinitex was built at ', b) Sys.chmod(b, '0755') print(file.info(b))