Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Io #42

Merged
merged 41 commits into from
Sep 14, 2024
Merged

Io #42

Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
41 commits
Select commit Hold shift + click to select a range
d731b9f
chore: remove windows compatibility
eWert-Online Apr 19, 2024
db825e0
chore: remove opam lock file
eWert-Online Apr 19, 2024
6a6702e
test: update snapshots
eWert-Online Apr 19, 2024
5871330
feat: update chromium to r1289146
eWert-Online Apr 19, 2024
b0a71f5
chore: update ocaml to 5.1.1
eWert-Online Apr 19, 2024
8fdfbf1
chore: update static build to ocaml 5.1
eWert-Online Apr 19, 2024
2e35c0c
fix: make cleanup command work again
eWert-Online Apr 19, 2024
40b1ed9
chore: format code
eWert-Online Apr 19, 2024
7640fcd
fix: use correct path concatenation
eWert-Online Apr 20, 2024
581596f
WIP: replace lwt with eio
eWert-Online Jul 8, 2024
0231008
update
eWert-Online Jul 8, 2024
9736efb
add openssl-dev
eWert-Online Jul 8, 2024
39787c7
feat: implement download and websocket with httpun
eWert-Online Jul 13, 2024
307ea5e
fix: pin httpun-ws fix
eWert-Online Jul 13, 2024
77b361b
chore: update to chromium 126
eWert-Online Jul 13, 2024
492d3f7
fix: find global config in parent directories
eWert-Online Jul 14, 2024
2e30c16
chore: implement websocket handler with piaf
eWert-Online Jul 14, 2024
12804ce
feat: add progress counter
eWert-Online Jul 14, 2024
9cba6bf
ci: pin more packages
eWert-Online Jul 14, 2024
61f343c
ci: install libressl-dev
eWert-Online Jul 14, 2024
2e42481
ci: update and install openssl on mac
eWert-Online Jul 14, 2024
595fcea
ci: add conf-openssl to dependencies
eWert-Online Jul 14, 2024
a41169b
ci: remove openssl setup step
eWert-Online Jul 14, 2024
2a47c83
ci: setup openssl on macos
eWert-Online Jul 14, 2024
0f460fc
ci: set openssl env
eWert-Online Jul 14, 2024
cbd8753
chore: update ocaml to 5.2
eWert-Online Jul 14, 2024
42914cf
ci: test
eWert-Online Jul 14, 2024
d5fe08a
ci: ...
eWert-Online Jul 14, 2024
72d7c09
feat: speedup image generation in chromium
eWert-Online Jul 21, 2024
141d775
chore: prepare for removal of "old" (more performant) headless mode
eWert-Online Jul 21, 2024
76c8412
chore: refactor png io
eWert-Online Jul 21, 2024
d8bebcc
chore: deprecate parallelism config
eWert-Online Jul 21, 2024
3e81d24
fix(ci): loosen version constraint for chromium in docker
eWert-Online Jul 21, 2024
fa110c1
fix: update flags preventing chromium on linux from starting correctly
eWert-Online Jul 21, 2024
2b47157
fix: running as root without "--no-sandbox" is not supported
eWert-Online Jul 21, 2024
2b5fa7b
chore: update dependencies
eWert-Online Sep 10, 2024
aef7324
chore: update chromium in docker
eWert-Online Sep 10, 2024
a02c89f
chore: update odiff
eWert-Online Sep 13, 2024
24d9bee
chore: revert switch to httpun-ws
eWert-Online Sep 13, 2024
e2aae81
chore: update chromium
eWert-Online Sep 13, 2024
3c2fa6a
fix: update path to chromium in docker
eWert-Online Sep 13, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/bundle-release.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ const packageJson = JSON.stringify(
'postinstall.js',
'platform-linux/',
'platform-darwin/',
'platform-windows-x64/',
// 'platform-windows-x64/',
],
},
null,
Expand Down
87 changes: 46 additions & 41 deletions .github/workflows/publish-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Publish to npm / Docker
on:
push:
branches:
- '**'
- "**"
release:
types: [prereleased, released]

Expand All @@ -18,13 +18,13 @@ jobs:
sudo rm -rf "/usr/local/share/boost"
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- name: Build statically linked package
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile
Expand All @@ -45,7 +45,7 @@ jobs:
mkdir -p _release/bin
cp _build/default/bin/Main.exe _release/bin/osnap

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ubuntu-latest
path: _release/
Expand All @@ -55,22 +55,29 @@ jobs:
fail-fast: false
matrix:
os:
- windows-latest
# - windows-latest
- macOS-latest
ocaml-compiler:
- 4.14.x
- 5.2.x
runs-on: ${{ matrix.os }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4

- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
uses: ocaml/setup-ocaml@v3
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install dependencies
run: opam install . --locked --deps-only --with-test --yes
run: |
brew install openssl@3
ls -l /opt/homebrew/opt/openssl@3/include/openssl
export LDFLAGS="-L/opt/homebrew/opt/openssl@3/lib"
export CPPFLAGS="-I/opt/homebrew/opt/openssl@3/include"
export PKG_CONFIG_PATH="/opt/homebrew/opt/openssl@3/lib/pkgconfig"
env
opam install . --locked --deps-only --with-test --yes

- name: Build OSnap
run: opam exec -- dune build -p osnap --profile=release
Expand All @@ -81,7 +88,7 @@ jobs:
mv _build/default/bin/Main.exe _release/bin/osnap

# Upload the npm package as an artifact
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: ${{ matrix.os }}
path: _release/
Expand All @@ -91,32 +98,32 @@ jobs:
needs: [build-platform, build-static]
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/

- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
fetch-depth: 1
ref: ${{ github.ref }}
submodules: true

# Download platform artifacts
- name: Download Linux release
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ubuntu-latest
path: ubuntu-latest

- name: Download Windows release
uses: actions/download-artifact@v2
with:
name: windows-latest
path: windows-latest
# - name: Download Windows release
# uses: actions/download-artifact@v2
# with:
# name: windows-latest
# path: windows-latest

- name: Download macOS release
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: macOS-latest
path: macOS-latest
Expand All @@ -128,10 +135,8 @@ jobs:
- name: Move artifacts into release
run: |
mkdir -p _release/platform-linux
mkdir -p _release/platform-windows-x64
mkdir -p _release/platform-darwin
cp -a ubuntu-latest/. _release/platform-linux
cp -a windows-latest/. _release/platform-windows-x64
cp -a macOS-latest/. _release/platform-darwin

- name: Increment nightly version
Expand All @@ -147,12 +152,12 @@ jobs:
run: mv _release/*.tgz osnap.tgz

# Upload artifacts
- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: release
path: _release/

- uses: actions/upload-artifact@v2
- uses: actions/upload-artifact@v4
with:
name: release-tarball
path: osnap.tgz
Expand All @@ -169,12 +174,12 @@ jobs:
- macOS-latest
# - windows-latest
steps:
- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20

- name: Download ${{ matrix.os }} release
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: release-tarball

Expand All @@ -189,11 +194,11 @@ jobs:
runs-on: ubuntu-latest
needs: [prepare-publish, test-platform]
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4

- uses: actions/setup-node@v2
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 20
registry-url: https://registry.npmjs.org/

- name: Download release package
Expand Down Expand Up @@ -242,28 +247,28 @@ jobs:
sudo rm -rf "$AGENT_TOOLSDIRECTORY"

- name: Set up QEMU
uses: docker/setup-qemu-action@v1
uses: docker/setup-qemu-action@v3

- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
uses: docker/setup-buildx-action@v3

- uses: actions/checkout@v2
- uses: actions/checkout@v4

- name: Download Linux release
uses: actions/download-artifact@v2
uses: actions/download-artifact@v4
with:
name: ubuntu-latest
path: ./_release

- name: Login to DockerHub
uses: docker/login-action@v1
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
password: ${{ secrets.DOCKERHUB_TOKEN }}

- name: Build & Publish Nightly ${{ matrix.container }}
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.${{ matrix.container }}
Expand All @@ -276,7 +281,7 @@ jobs:

- name: Build & Publish nightly-${{ github.ref_name }} ${{ matrix.container }}
if: ${{ github.event_name == 'push' && github.ref != 'refs/heads/master' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.${{ matrix.container }}
Expand All @@ -289,7 +294,7 @@ jobs:

- name: Build & Publish Next ${{ matrix.container }}
if: ${{ github.event_name == 'release' }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.${{ matrix.container }}
Expand All @@ -302,7 +307,7 @@ jobs:

- name: Build & Publish ${{ matrix.container }}
if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.${{ matrix.container }}
Expand All @@ -315,7 +320,7 @@ jobs:

- name: Build & Publish Latest ${{ matrix.container }}
if: ${{ github.event_name == 'release' && !github.event.release.prerelease }}
uses: docker/build-push-action@v2
uses: docker/build-push-action@v6
with:
context: .
file: docker/Dockerfile.${{ matrix.container }}
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/release-postinstall.js
Original file line number Diff line number Diff line change
Expand Up @@ -111,12 +111,8 @@ var copyPlatformBinaries = (platformPath) => {

switch (platform) {
case 'win32':
if (arch() !== 'x64') {
console.warn('error: x86 is currently not supported on Windows');
process.exit(1);
}

copyPlatformBinaries('windows-x64');
console.warn('error: Windows is currently not supported. If you need windows support, please reach out at https://github.com/eWert-Online/OSnap/issues');
process.exit(1);
break;
case 'linux':
case 'darwin':
Expand Down
5 changes: 1 addition & 4 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,11 @@ install:
if ! [ -e _opam ]; then \
opam switch create . --empty ; \
fi
opam install . --locked --deps-only --with-test --yes
opam install -y ocaml-lsp-server ocamlformat
opam lock .
opam install . --deps-only --working-dir --with-test --with-dev-setup --yes

update:
opam update
opam upgrade
opam lock .

fmt:
opam exec -- dune build @fmt --auto-promote
Expand Down
Loading
Loading