Skip to content

Commit

Permalink
Remove references to package server in CI
Browse files Browse the repository at this point in the history
  • Loading branch information
changlinli committed Jul 1, 2024
1 parent b8b25ed commit 1f18f29
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 121 deletions.
55 changes: 0 additions & 55 deletions .github/workflows/haskell.yml
Original file line number Diff line number Diff line change
Expand Up @@ -74,58 +74,3 @@ jobs:
with:
name: zokka-compiler-dev-version
path: ./output/zokka

build-package-server:
runs-on: ubuntu-latest
# Use older version of alpine that predates this change
# https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
# Otherwise we error out when linking statically complaining about sendfile64 in snap-server
container: alpine:3.16
# A lot of this comes from https://github.com/hasufell/stack2cabal/blob/160ae10b9e78c398803ed7ba4ab9d49c553df42d/.github/workflows/release.yaml#L32
steps:
- name: Install system dependencies
run: |
apk add --no-cache curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz gzip tar perl git bash sudo binutils-gold
apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static python3-dev nodejs npm
- name: Install ghcup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup
chmod +x /usr/bin/ghcup
echo "$HOME/.ghcup/bin" $GITHUB_PATH
shell: bash

- name: Install GHC and cabal
run: |
ghcup install ghc --force -i /usr/local 9.4.8
ghcup install cabal --force -i /usr/local/bin 3.10
shell: bash

- name: Checkout code
uses: actions/checkout@v4

- name: Build Project
shell: bash
run: |
rm cabal.project
cd custom-package-server
cabal update
mkdir -p /top-level-output
cabal build --enable-executable-static # We use build instead of install because our version of Cabal doesn't handle https://github.com/haskell/cabal/pull/9697, which prevents --enble-executable-static from being used with cabal install
OUTPUT_BIN=$(cabal list-bin myPackage)
python3 example_test.py --skip-initial-cabal-build
cp $OUTPUT_BIN /top-level-output/zokka-custom-package-server
cd elm-src
npx zokka make frontend/Main.elm --output=elm.js
mkdir -p /top-level-output/generated-static-files/ui
cp elm.js /top-level-output/generated-static-files/ui
cp index.html /top-level-output/generated-static-files/ui
cp -r assets /top-level-output/generated-static-files/ui
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: zokka-custom-package-server-dev-version
path: |
/top-level-output/
66 changes: 0 additions & 66 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,72 +76,6 @@ jobs:
name: zokka-compiler-${{ matrix.binary-fragment-name }}-${{ steps.get_version.outputs.tag }}
path: ./output/zokka

build-package-server:
strategy:
fail-fast: true
matrix:
include:
- os: ubuntu-latest
binary-fragment-name: linux-x86_64
runs-on: ${{ matrix.os }}
# Use older version of alpine that predates this change
# https://git.musl-libc.org/cgit/musl/commit/?id=246f1c811448f37a44b41cd8df8d0ef9736d95f4
# Otherwise we error out when linking statically complaining about sendfile64 in snap-server
container: alpine:3.16
# A lot of this comes from https://github.com/hasufell/stack2cabal/blob/160ae10b9e78c398803ed7ba4ab9d49c553df42d/.github/workflows/release.yaml#L32
steps:
- name: Install system dependencies
run: |
apk add --no-cache curl gcc g++ gmp-dev ncurses-dev libffi-dev make xz gzip tar perl git bash sudo binutils-gold
apk add --no-cache zlib zlib-dev zlib-static gmp gmp-dev ncurses-static python3-dev nodejs npm
- name: Install ghcup
run: |
curl --proto '=https' --tlsv1.2 -sSf https://downloads.haskell.org/~ghcup/x86_64-linux-ghcup > /usr/bin/ghcup
chmod +x /usr/bin/ghcup
echo "$HOME/.ghcup/bin" $GITHUB_PATH
shell: bash

- name: Install GHC and cabal
run: |
ghcup install ghc --force -i /usr/local 9.4.8
ghcup install cabal --force -i /usr/local/bin 3.10
shell: bash

- name: Checkout code
uses: actions/checkout@v4

- name: Build Project
shell: bash
run: |
rm cabal.project
cd custom-package-server
cabal update
mkdir -p /top-level-output
cabal build --enable-executable-static # We use build instead of install because our version of Cabal doesn't handle https://github.com/haskell/cabal/pull/9697, which prevents --enble-executable-static from being used with cabal install
OUTPUT_BIN=$(cabal list-bin myPackage)
python3 example_test.py --skip-initial-cabal-build
cp $OUTPUT_BIN /top-level-output/zokka-custom-package-server
cd elm-src
npx zokka make frontend/Main.elm --output=elm.js
mkdir -p /top-level-output/generated-static-files/ui
cp elm.js /top-level-output/generated-static-files/ui
cp index.html /top-level-output/generated-static-files/ui
cp -r assets /top-level-output/generated-static-files/ui
# Extract the current git tag
- name: Extract Git Tag
id: get_version
run: |
git config --global --add safe.directory /__w/zokka-compiler/zokka-compiler
echo "##[set-output name=tag;]$(git describe --tags --abbrev=0)"
- name: Upload Artifacts
uses: actions/upload-artifact@v4
with:
name: zokka-custom-package-server-${{ matrix.binary-fragment-name }}-${{ steps.get_version.outputs.tag }}
path: /top-level-output/zokka-custom-package-server

build:
strategy:
fail-fast: true
Expand Down

0 comments on commit 1f18f29

Please sign in to comment.