Skip to content

Commit

Permalink
💚 - Fix CI Build.
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland Peelen committed Jan 19, 2024
1 parent dd21527 commit e0d3477
Show file tree
Hide file tree
Showing 4 changed files with 54 additions and 95 deletions.
105 changes: 41 additions & 64 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,55 +8,45 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
ocaml-compiler: [5.1]
os: [ubuntu-latest]

container:
image: alexfedoseev/alpine-node-yarn-esy:0.0.4

steps:
- uses: actions/checkout@v1
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Add tar
run: apk add --no-cache tar
- name: Install
run: esy install

- name: Print esy cache
id: print_esy_cache
run: node .github/workflows/print_esy_cache.js
- name: Install Deps
run: |
make install
npm ci --no-optional --ignore-scripts
- name: Try to restore dependencies cache
uses: actions/cache@v2
id: deps-cache
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
restore-keys: |
${{ matrix.os }}-
- name: Build
run: make build

- name: build
run: esy b
- name: Native Tests
run: make native-tests
env:
CI: true

- name: native tests
run: |
esy b dune runtest -f
- name: Snapshot Tests
run: make snapshot-tests
env:
CI: true

- name: snapshot tests
- name: Release Static
env:
GRAPHQL_CI: true
run: |
npm ci --no-optional --ignore-scripts
esy test
esy release-static
run: make release-static

- name: (only on release) Upload artifacts ${{ matrix.os }}
- name: Upload artifacts ${{ matrix.os }} (Only on release)
uses: actions/upload-artifact@master
with:
name: ${{ matrix.os }}
Expand All @@ -67,57 +57,44 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [16.x]
node-version: [18.x]
os: [windows-latest, macOS-latest]

steps:
- uses: actions/checkout@v1

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Set-up OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}

- name: Install esy
- name: Install Deps
run: |
npm install -g [email protected]
- name: Install
run: esy install

- name: Print esy cache
id: print_esy_cache
run: node .github/workflows/print_esy_cache.js
make install
npm ci --no-optional --ignore-scripts
- name: Try to restore dependencies cache
id: deps-cache
uses: actions/cache@v2
with:
path: ${{ steps.print_esy_cache.outputs.esy_cache }}
key: ${{ matrix.os }}-${{ hashFiles('**/index.json') }}
- name: Build
run: make build

- name: build
run: esy b
- name: Native Tests
run: make native-tests
env:
CI: true

- name: test-native
run: |
esy b dune runtest -f
- name: Snapshot Tests
run: make snapshot-tests
env:
CI: true

- name: npm ci
if: runner.os != 'Windows'
run: |
npm ci --no-optional
- name: Release Static
env:
GRAPHQL_CI: true
run: make release-static

- name: snaphot tests
if: runner.os != 'Windows'
run: |
esy test
- name: (only on release) Upload artifacts ${{ matrix.os }}
- name: Upload artifacts ${{ matrix.os }} (Only on release)
uses: actions/upload-artifact@master
with:
name: ${{ matrix.os }}
Expand All @@ -131,7 +108,7 @@ jobs:
- uses: actions/checkout@v1
- uses: actions/setup-node@v1
with:
node-version: "12.x"
node-version: "18.x"
registry-url: "https://registry.npmjs.org"

- name: Download linux artifacts
Expand Down
13 changes: 0 additions & 13 deletions .github/workflows/print_esy_cache.js

This file was deleted.

18 changes: 13 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,26 @@ install: ## Install development dependencies
opam update
opam install -y . --deps-only --with-test

.PHONY: native-tests
native-tests: ## Run native tests
$(DUNE) runtest -f

.PHONY: snapshot-tests
snapshot-tests: ## Run snapshot tests
./tests.sh

.PHONY: test
test: ## Run tests using yest
$(DUNE) build
./tests.sh
make native-tests
make snapshot-tests

.PHONY: build
build: ## Build the project
$(DUNE) build

.PHONY: release_static
release_static: ## Release the project
$(DUNE) build --root . --only-packages '#{self.name}' --ignore-promoted-rules --no-config --profile release-static
.PHONY: release-static
release-static: ## Release the project
$(DUNE) build --root . --only-packages ${project_name} --ignore-promoted-rules --no-config --profile release-static

.PHONY: build_verbose
build_verbose: ## Build the project
Expand Down
13 changes: 0 additions & 13 deletions yarn.lock

This file was deleted.

0 comments on commit e0d3477

Please sign in to comment.