Skip to content

Commit 1a5a7fb

Browse files
committed
.
1 parent 41fd046 commit 1a5a7fb

2 files changed

Lines changed: 248 additions & 248 deletions

File tree

.github/workflows/ci.yml

Lines changed: 145 additions & 145 deletions
Original file line numberDiff line numberDiff line change
@@ -40,148 +40,148 @@ jobs:
4040
with:
4141
fetch-depth: 0
4242

43-
# - name: Install required libraries
44-
# run: sudo apt-get update && sudo apt-get install -y libgtk-4-dev libgraphene-1.0-dev libavif-dev
45-
46-
# - name: Install binaryen (wasm-opt)
47-
# run: |
48-
# BINARYEN_VERSION=$(curl -s https://api.github.com/repos/WebAssembly/binaryen/releases/latest | jq -r .tag_name)
49-
# curl -L "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz" | tar xz
50-
# sudo cp binaryen-${BINARYEN_VERSION}/bin/wasm-opt /usr/local/bin/
51-
# wasm-opt --version
52-
53-
# - name: Install terser
54-
# run: npm install -g terser
55-
56-
# - name: Download deps
57-
# run: ./mill __.prepareOffline
58-
59-
# - name: Cache Playwright dependencies
60-
# id: cache-pw
61-
# uses: actions/cache@v4
62-
# with:
63-
# path: ~/.cache/ms-playwright
64-
# key: playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.mill') }}
65-
# restore-keys: |
66-
# playwright-${{ runner.os }}-
67-
68-
# - name: Install Playwright (browsers + system deps)
69-
# run: ./mill PlaywrightSetup install --with-deps chromium-headless-shell
70-
71-
# - name: formatCheck
72-
# run: ./mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
73-
# - name: Pre-fetch ScalaJS linker deps and integration test deps
74-
# run: |
75-
# ./mill sjsls.cacheJsLibs.fastLinkJS
76-
# cs fetch org.scala-js:scalajs-dom_sjs1_3:2.8.0 io.github.quafadas:vecxt_sjs1_3:0.0.38
77-
78-
# - name: scala-cli version
79-
# run: scala-cli compile -e "()" --platform js && scala-cli run -e "()"
80-
81-
# - name: scala-cli setup part deux
82-
# run: |
83-
# HELLO_WORLD_FILE=$(./mill show PlaywrightSetup.helloWorldCode | sed -n 's/^"\(.*\)"$/\1/p')
84-
# test -n "$HELLO_WORLD_FILE"
85-
# scala-cli package "$HELLO_WORLD_FILE" -o ${PWD}/tmp -f --power
86-
87-
# - name: Test CLI
88-
# run: ./mill __.test
89-
90-
# - name: Test Plugin
91-
# run: ./mill plugin.integration.testForked
92-
93-
# - name: Publish Test Report
94-
# uses: mikepenz/action-junit-report@v5
95-
# if: always()
96-
# with:
97-
# fail_on_failure: false
98-
# include_passed: false
99-
# detailed_summary: true
100-
# annotate_only: true
101-
# require_tests: false
102-
# report_paths: 'out/**/test-report.xml'
103-
104-
# publish:
105-
# if: github.repository == 'Quafadas/live-server-scala-cli-js' && contains(github.ref, 'refs/tags/')
106-
# needs: build
107-
# runs-on: ubuntu-latest
108-
# steps:
109-
# - uses: actions/checkout@main
110-
# with:
111-
# fetch-depth: 0
112-
# fetch-tags: true
113-
114-
# - uses: coursier/cache-action@v8
115-
# - uses: coursier/setup-action@main
116-
# with:
117-
# jvm: temurin@21
118-
# apps: scala-cli
119-
120-
# - name: Import GPG key
121-
# uses: crazy-max/ghaction-import-gpg@v6
122-
# with:
123-
# gpg_private_key: ${{ secrets.PGP_SECRET }}
124-
# passphrase: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
125-
# git_config_global: true
126-
127-
# - name: Prepare GPG
128-
# run: |
129-
# echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
130-
# gpgconf --reload gpg-agent
131-
132-
# - name: List keys
133-
# run: gpg -K
134-
135-
# - name: Publish to Maven Central
136-
# run: ./mill mill.javalib.SonatypeCentralPublishModule/publishAll --publishArtifacts __.publishArtifacts
137-
# env:
138-
# MILL_PGP_PASSPHRASE: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
139-
# MILL_PGP_SECRET_BASE64: ${{ secrets.PGP_SECRET }}
140-
# MILL_SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
141-
# MILL_SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }}
142-
143-
# site:
144-
# if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
145-
# needs: build
146-
# runs-on: ubuntu-latest
147-
# steps:
148-
# - uses: coursier/cache-action@v8
149-
# - uses: coursier/setup-action@main
150-
# with:
151-
# jvm: temurin@21
152-
# apps: scala-cli
153-
# - uses: actions/checkout@main
154-
# with:
155-
# fetch-depth: 0
156-
# fetch-tags: true
157-
# - run: ./mill site.siteGen
158-
# - name: Setup Pages
159-
# uses: actions/configure-pages@main
160-
# - uses: actions/upload-artifact@main
161-
# with:
162-
# name: page
163-
# path: out/site/laika/generateSite.dest
164-
# if-no-files-found: error
165-
166-
# deploy:
167-
# if: github.ref == 'refs/heads/main'
168-
# needs: site
169-
# permissions:
170-
# pages: write
171-
# id-token: write
172-
# environment:
173-
# name: github-pages
174-
# url: ${{ steps.deployment.outputs.page_url }}
175-
# runs-on: ubuntu-latest
176-
# steps:
177-
# - uses: actions/download-artifact@main
178-
# with:
179-
# name: page
180-
# path: .
181-
# - uses: actions/configure-pages@main
182-
# - uses: actions/upload-pages-artifact@main
183-
# with:
184-
# path: .
185-
# - name: Deploy to GitHub Pages
186-
# id: deployment
187-
# uses: actions/deploy-pages@main
43+
- name: Install required libraries
44+
run: sudo apt-get update && sudo apt-get install -y libgtk-4-dev libgraphene-1.0-dev libavif-dev
45+
46+
- name: Install binaryen (wasm-opt)
47+
run: |
48+
BINARYEN_VERSION=$(curl -s https://api.github.com/repos/WebAssembly/binaryen/releases/latest | jq -r .tag_name)
49+
curl -L "https://github.com/WebAssembly/binaryen/releases/download/${BINARYEN_VERSION}/binaryen-${BINARYEN_VERSION}-x86_64-linux.tar.gz" | tar xz
50+
sudo cp binaryen-${BINARYEN_VERSION}/bin/wasm-opt /usr/local/bin/
51+
wasm-opt --version
52+
53+
- name: Install terser
54+
run: npm install -g terser
55+
56+
- name: Download deps
57+
run: ./mill __.prepareOffline
58+
59+
- name: Cache Playwright dependencies
60+
id: cache-pw
61+
uses: actions/cache@v4
62+
with:
63+
path: ~/.cache/ms-playwright
64+
key: playwright-${{ runner.os }}-${{ hashFiles('playwrightVersion.mill') }}
65+
restore-keys: |
66+
playwright-${{ runner.os }}-
67+
68+
- name: Install Playwright (browsers + system deps)
69+
run: ./mill PlaywrightSetup install --with-deps chromium-headless-shell
70+
71+
- name: formatCheck
72+
run: ./mill mill.scalalib.scalafmt.ScalafmtModule/checkFormatAll __.sources
73+
- name: Pre-fetch ScalaJS linker deps and integration test deps
74+
run: |
75+
./mill sjsls.cacheJsLibs.fastLinkJS
76+
cs fetch org.scala-js:scalajs-dom_sjs1_3:2.8.0 io.github.quafadas:vecxt_sjs1_3:0.0.38
77+
78+
- name: scala-cli version
79+
run: scala-cli compile -e "()" --platform js && scala-cli run -e "()"
80+
81+
- name: scala-cli setup part deux
82+
run: |
83+
HELLO_WORLD_FILE=$(./mill show PlaywrightSetup.helloWorldCode | sed -n 's/^"\(.*\)"$/\1/p')
84+
test -n "$HELLO_WORLD_FILE"
85+
scala-cli package "$HELLO_WORLD_FILE" -o ${PWD}/tmp -f --power
86+
87+
- name: Test CLI
88+
run: ./mill __.test
89+
90+
- name: Test Plugin
91+
run: ./mill plugin.integration.testForked
92+
93+
- name: Publish Test Report
94+
uses: mikepenz/action-junit-report@v5
95+
if: always()
96+
with:
97+
fail_on_failure: false
98+
include_passed: false
99+
detailed_summary: true
100+
annotate_only: true
101+
require_tests: false
102+
report_paths: 'out/**/test-report.xml'
103+
104+
publish:
105+
if: github.repository == 'Quafadas/live-server-scala-cli-js' && contains(github.ref, 'refs/tags/')
106+
needs: build
107+
runs-on: ubuntu-latest
108+
steps:
109+
- uses: actions/checkout@main
110+
with:
111+
fetch-depth: 0
112+
fetch-tags: true
113+
114+
- uses: coursier/cache-action@v8
115+
- uses: coursier/setup-action@main
116+
with:
117+
jvm: temurin@21
118+
apps: scala-cli
119+
120+
- name: Import GPG key
121+
uses: crazy-max/ghaction-import-gpg@v6
122+
with:
123+
gpg_private_key: ${{ secrets.PGP_SECRET }}
124+
passphrase: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
125+
git_config_global: true
126+
127+
- name: Prepare GPG
128+
run: |
129+
echo "allow-loopback-pinentry" >> ~/.gnupg/gpg-agent.conf
130+
gpgconf --reload gpg-agent
131+
132+
- name: List keys
133+
run: gpg -K
134+
135+
- name: Publish to Maven Central
136+
run: ./mill mill.javalib.SonatypeCentralPublishModule/publishAll --publishArtifacts __.publishArtifacts
137+
env:
138+
MILL_PGP_PASSPHRASE: ${{ secrets.PUBLISH_SECRET_KEY_PASSWORD }}
139+
MILL_PGP_SECRET_BASE64: ${{ secrets.PGP_SECRET }}
140+
MILL_SONATYPE_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }}
141+
MILL_SONATYPE_USERNAME: ${{ secrets.PUBLISH_USER }}
142+
143+
site:
144+
if: github.event_name == 'pull_request' || github.ref == 'refs/heads/main'
145+
needs: build
146+
runs-on: ubuntu-latest
147+
steps:
148+
- uses: coursier/cache-action@v8
149+
- uses: coursier/setup-action@main
150+
with:
151+
jvm: temurin@21
152+
apps: scala-cli
153+
- uses: actions/checkout@main
154+
with:
155+
fetch-depth: 0
156+
fetch-tags: true
157+
- run: ./mill site.siteGen
158+
- name: Setup Pages
159+
uses: actions/configure-pages@main
160+
- uses: actions/upload-artifact@main
161+
with:
162+
name: page
163+
path: out/site/laika/generateSite.dest
164+
if-no-files-found: error
165+
166+
deploy:
167+
if: github.ref == 'refs/heads/main'
168+
needs: site
169+
permissions:
170+
pages: write
171+
id-token: write
172+
environment:
173+
name: github-pages
174+
url: ${{ steps.deployment.outputs.page_url }}
175+
runs-on: ubuntu-latest
176+
steps:
177+
- uses: actions/download-artifact@main
178+
with:
179+
name: page
180+
path: .
181+
- uses: actions/configure-pages@main
182+
- uses: actions/upload-pages-artifact@main
183+
with:
184+
path: .
185+
- name: Deploy to GitHub Pages
186+
id: deployment
187+
uses: actions/deploy-pages@main

0 commit comments

Comments
 (0)