From 7448323bb988b3d09881f380dc5d69909f75daa1 Mon Sep 17 00:00:00 2001 From: Qian Yun Date: Tue, 15 Oct 2024 20:41:38 +0800 Subject: [PATCH] [ci] test more Lisps --- .github/workflows/linux-ccl.yml | 57 ++++++++++++++++++++++++++ .github/workflows/linux-clisp.yml | 55 +++++++++++++++++++++++++ .github/workflows/linux-ecl.yml | 55 +++++++++++++++++++++++++ .github/workflows/linux-gcl.yml | 55 +++++++++++++++++++++++++ .github/workflows/macOS-clisp.yml | 67 +++++++++++++++++++++++++++++++ .github/workflows/macOS-ecl.yml | 67 +++++++++++++++++++++++++++++++ .github/workflows/windows-ccl.yml | 62 ++++++++++++++++++++++++++++ 7 files changed, 418 insertions(+) create mode 100644 .github/workflows/linux-ccl.yml create mode 100644 .github/workflows/linux-clisp.yml create mode 100644 .github/workflows/linux-ecl.yml create mode 100644 .github/workflows/linux-gcl.yml create mode 100644 .github/workflows/macOS-clisp.yml create mode 100644 .github/workflows/macOS-ecl.yml create mode 100644 .github/workflows/windows-ccl.yml diff --git a/.github/workflows/linux-ccl.yml b/.github/workflows/linux-ccl.yml new file mode 100644 index 000000000..3746f45ab --- /dev/null +++ b/.github/workflows/linux-ccl.yml @@ -0,0 +1,57 @@ +name: FriCAS CI on Linux on CCL + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-24.04 + timeout-minutes: 30 + + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install libgmp-dev libxpm-dev + wget https://github.com/Clozure/ccl/releases/download/v1.13/ccl-1.13-linuxx86.tar.gz + tar xvf ccl-1.13-linuxx86.tar.gz + + - name: configure + run: ./configure --with-lisp=`pwd`/ccl/lx86cl64 --with-gmp --with-x || cat config.log + + - name: make + run: make -j4 --output-sync + + - name: make check + run: make check -j4 --output-sync + + - name: Create artifact archives + run: | + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + tar -cjf FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 target/ + + - name: Upload Linux binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-linux-x86_64-binary + path: FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-linux-x86_64-${SHA}.tar.bz2 + export FILENAME2=fricas-${GITHUB_REF_NAME}-linux-x86_64.tar.bz2 + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2" \ + -H "Content-Type: application/x-bzip2" || true diff --git a/.github/workflows/linux-clisp.yml b/.github/workflows/linux-clisp.yml new file mode 100644 index 000000000..04de7b28b --- /dev/null +++ b/.github/workflows/linux-clisp.yml @@ -0,0 +1,55 @@ +name: FriCAS CI on Linux on CLISP + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-20.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install clisp libxpm-dev + + - name: configure + run: ./configure --with-lisp=clisp --with-x || cat config.log + + - name: make + run: make -j4 --output-sync + + - name: make check + run: make check -j4 --output-sync + + - name: Create artifact archives + run: | + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + tar -cjf FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 target/ + + - name: Upload Linux binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-linux-x86_64-binary + path: FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-linux-x86_64-${SHA}.tar.bz2 + export FILENAME2=fricas-${GITHUB_REF_NAME}-linux-x86_64.tar.bz2 + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2" \ + -H "Content-Type: application/x-bzip2" || true diff --git a/.github/workflows/linux-ecl.yml b/.github/workflows/linux-ecl.yml new file mode 100644 index 000000000..39ff04227 --- /dev/null +++ b/.github/workflows/linux-ecl.yml @@ -0,0 +1,55 @@ +name: FriCAS CI on Linux on ECL + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-20.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install ecl libxpm-dev + + - name: configure + run: ./configure --with-lisp=ecl --with-x || cat config.log + + - name: make + run: make -j4 --output-sync + + - name: make check + run: make check -j4 --output-sync + + - name: Create artifact archives + run: | + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + tar -cjf FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 target/ + + - name: Upload Linux binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-linux-x86_64-binary + path: FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-linux-x86_64-${SHA}.tar.bz2 + export FILENAME2=fricas-${GITHUB_REF_NAME}-linux-x86_64.tar.bz2 + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2" \ + -H "Content-Type: application/x-bzip2" || true diff --git a/.github/workflows/linux-gcl.yml b/.github/workflows/linux-gcl.yml new file mode 100644 index 000000000..6efeee8de --- /dev/null +++ b/.github/workflows/linux-gcl.yml @@ -0,0 +1,55 @@ +name: FriCAS CI on Linux on GCL + +on: [push, pull_request] + +jobs: + build: + + runs-on: ubuntu-24.04 + timeout-minutes: 60 + + steps: + - uses: actions/checkout@v4 + - name: install dependencies + run: | + sudo apt-get update + sudo apt-get install gcl libxpm-dev libreadline-dev + + - name: configure and make + run: | + export GCL_ANSI=t + ./configure --with-lisp=gcl --with-x || cat config.log + make -j4 --output-sync + + - name: make check + run: make check -j4 --output-sync + + - name: Create artifact archives + run: | + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + tar -cjf FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 target/ + + - name: Upload Linux binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-linux-x86_64-binary + path: FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2 + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-linux-x86_64-${SHA}.tar.bz2 + export FILENAME2=fricas-${GITHUB_REF_NAME}-linux-x86_64.tar.bz2 + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-linux-x86_64-${{ github.sha }}.tar.bz2" \ + -H "Content-Type: application/x-bzip2" || true diff --git a/.github/workflows/macOS-clisp.yml b/.github/workflows/macOS-clisp.yml new file mode 100644 index 000000000..74dbc9718 --- /dev/null +++ b/.github/workflows/macOS-clisp.yml @@ -0,0 +1,67 @@ +name: FriCAS CI on macOS on CLISP + +on: [push, pull_request] + +jobs: + build: + + strategy: + fail-fast: false + matrix: + os: [macos-13, macos-14] + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + env: + SBCL_VER: ${{ matrix.os == 'macos-13' && '2.2.9' || '2.4.0' }} + ARCH: ${{ matrix.os == 'macos-13' && 'x86-64' || 'arm64' }} + + steps: + - uses: actions/checkout@v4 + - name: download and install CLISP + run: brew install clisp + + - name: configure + run: | + mkdir ../build && cd ../build + ../fricas/configure --with-lisp=clisp || cat config.log + + - name: make + run: cd ../build && make -j4 + + - name: make check + run: cd ../build && make check -j4 + + - name: Create artifact archives + run: | + cd ../build + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + make dist-macos + cp -v `brew list gmp | grep libgmp.10.dylib` FriCAS.app/Contents/Resources/usr/local/lib/fricas/target/*/lib/ + ## reduce chance of error caused by "hdiutil: Resource busy" + make dist-macos-dmg || make dist-macos-dmg + mv FriCAS.dmg ../fricas/FriCAS-macOS-${ARCH}-${{ github.sha }}.dmg + + - name: Upload macOS binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-macOS-${{ env.ARCH }}-binary + path: FriCAS-macOS-${{ env.ARCH }}-${{ github.sha }}.dmg + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-macOS-${ARCH}-${SHA}-unsigned.dmg + export FILENAME2=fricas-${GITHUB_REF_NAME}-macOS-${ARCH}-unsigned.dmg + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-macOS-${ARCH}-${{ github.sha }}.dmg" \ + -H "Content-Type: application/x-apple-diskimage" || true diff --git a/.github/workflows/macOS-ecl.yml b/.github/workflows/macOS-ecl.yml new file mode 100644 index 000000000..0416f734d --- /dev/null +++ b/.github/workflows/macOS-ecl.yml @@ -0,0 +1,67 @@ +name: FriCAS CI on macOS on ECL + +on: [push, pull_request] + +jobs: + build: + + strategy: + fail-fast: false + matrix: + os: [macos-13, macos-14] + runs-on: ${{ matrix.os }} + timeout-minutes: 60 + env: + SBCL_VER: ${{ matrix.os == 'macos-13' && '2.2.9' || '2.4.0' }} + ARCH: ${{ matrix.os == 'macos-13' && 'x86-64' || 'arm64' }} + + steps: + - uses: actions/checkout@v4 + - name: download and install ECL + run: brew install ecl + + - name: configure + run: | + mkdir ../build && cd ../build + ../fricas/configure --with-lisp=ecl || cat config.log + + - name: make + run: cd ../build && make -j4 + + - name: make check + run: cd ../build && make check -j4 + + - name: Create artifact archives + run: | + cd ../build + test "$GITHUB_REF_TYPE" != "tag" && rm -r target/*/src + make dist-macos + cp -v `brew list gmp | grep libgmp.10.dylib` FriCAS.app/Contents/Resources/usr/local/lib/fricas/target/*/lib/ + ## reduce chance of error caused by "hdiutil: Resource busy" + make dist-macos-dmg || make dist-macos-dmg + mv FriCAS.dmg ../fricas/FriCAS-macOS-${ARCH}-${{ github.sha }}.dmg + + - name: Upload macOS binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-macOS-${{ env.ARCH }}-binary + path: FriCAS-macOS-${{ env.ARCH }}-${{ github.sha }}.dmg + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-macOS-${ARCH}-${SHA}-unsigned.dmg + export FILENAME2=fricas-${GITHUB_REF_NAME}-macOS-${ARCH}-unsigned.dmg + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-macOS-${ARCH}-${{ github.sha }}.dmg" \ + -H "Content-Type: application/x-apple-diskimage" || true diff --git a/.github/workflows/windows-ccl.yml b/.github/workflows/windows-ccl.yml new file mode 100644 index 000000000..b399b60dd --- /dev/null +++ b/.github/workflows/windows-ccl.yml @@ -0,0 +1,62 @@ +name: FriCAS CI on Windows on CCL + +on: [push, pull_request] + +jobs: + build: + + runs-on: windows-2019 + timeout-minutes: 30 + defaults: + run: + shell: msys2 {0} + + steps: + - uses: msys2/setup-msys2@v2 + with: + install: make mingw-w64-x86_64-gcc mingw-w64-x86_64-gmp gmp-devel zip unzip + + - uses: actions/checkout@v4 + - name: configure and make + run: | + mkdir ../build && cd ../build + wget https://github.com/Clozure/ccl/releases/download/v1.13/ccl-1.13-windowsx86.zip + unzip ccl-1.13-windowsx86.zip + ../fricas/configure --with-lisp=`pwd`/ccl/wx86cl64.exe --disable-gmp || cat config.log + make -j4 --output-sync + + - name: make check + run: cd ../build && make check -j4 --output-sync + + - name: Create artifact archives + run: | + test "$GITHUB_REF_TYPE" != "tag" && rm -r ../build/target/*/src + rm ../build/target/x86_64-w64-mingw32/bin/{fricas,fricas-readline} + mv ../build/target/x86_64-w64-mingw32 FriCAS-windows-x86_64 + cp /mingw64/bin/libgmp-10.dll FriCAS-windows-x86_64/lib/ + zip -r FriCAS-windows-x86_64-${{ github.sha }}.zip FriCAS-windows-x86_64 + + - name: Upload Windows binary + uses: actions/upload-artifact@v4 + with: + name: FriCAS-windows-x86_64-binary + path: FriCAS-windows-x86_64-${{ github.sha }}.zip + + - name: Upload to nightly release + if: ${{ github.event_name == 'push' && ( github.event.ref == 'refs/heads/master' || github.ref_type == 'tag' ) && github.repository == 'fricas/fricas' }} + ## RELEASE_ID is: + ## `curl https://api.github.com/${REPO_URL}/tags/nightly | jq .id` + run: | + export REPO_URL=repos/fricas/fricas-nightly-builds/releases + export RELEASE_ID=74905307 + export TIMESTAMP=$(date +%Y-%m-%dT%H.%M) + export SHA=$(echo ${{ github.sha }} | cut -c 1-8) + export FILENAME1=FriCAS-${TIMESTAMP}-windows-x86_64-${SHA}.zip + export FILENAME2=fricas-${GITHUB_REF_NAME}-windows-x64.zip + export FILENAME=$(test "$GITHUB_REF_TYPE" != "tag" && echo $FILENAME1 || echo $FILENAME2) + export URL=https://uploads.github.com/${REPO_URL}/${RELEASE_ID}/assets + curl -v -X POST -H "Accept: application/vnd.github+json" \ + -H "Authorization: token ${{ secrets.releasetoken }}" \ + "${URL}?name=${FILENAME}" \ + --data-binary "@FriCAS-windows-x86_64-${{ github.sha }}.zip" \ + -H "Content-Type: application/zip" || true