Skip to content

Commit

Permalink
chore: remove refs in build/test/release pipeline to downloading stan…
Browse files Browse the repository at this point in the history
…dalone and other refs
  • Loading branch information
YOU54F committed Feb 23, 2024
1 parent 731484c commit 8e68ac7
Show file tree
Hide file tree
Showing 10 changed files with 4 additions and 114 deletions.
13 changes: 0 additions & 13 deletions .github/workflows/build-and-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,19 +101,6 @@ jobs:
run: echo "ONLY_DOWNLOAD_PACT_FOR_WINDOWS=true" >> $GITHUB_ENV
- run: ./script/ci/unpack-and-test.sh


# Linux aarch64 tests are skipped as QEMU fails when executing the ruby binaries
# Related comment: https://github.com/phusion/passenger/issues/2288#issuecomment-1387625121
# - name: Set up QEMU
# if: runner.os == 'Linux'
# uses: docker/setup-qemu-action@v3
# - name: Set up Docker Buildx
# if: runner.os == 'Linux'
# uses: docker/setup-buildx-action@v3
# - if: runner.os == 'Linux'
# name: test arm64
# run: docker run -v $PWD:/home --platform linux/arm64 --rm node:20 bin/bash -c 'cd /home && /home/script/ci/unpack-and-test.sh'

release_dry_run:
runs-on: ubuntu-latest
needs: [ create_pre_release, prebuild ]
Expand Down
10 changes: 0 additions & 10 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -54,16 +54,6 @@ bin/**/**.js
# ts-node cache
ts-node-*

# pact standalone binaries
# standalone/*
standalone/darwin*
standalone/linux*
standalone/windows*
standalone/*.d.ts
standalone/*.js
standalone/*.checksum
standalone/*.gz
standalone/README.md
# FFI native bindings
*.so
*.dll*
Expand Down
44 changes: 1 addition & 43 deletions DEVELOPER.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,10 @@ As a developer, you need to run `bash script/ci/prebuild.sh` to
- download the FFI libraries to `ffi` folder
- prebuilds the binaries and outputs to `prebuilds`
- cleans up `ffi` and `build`
- downloads the `pact-ruby-standalone` bindings to `standalone`

For end users, the following is provided as part of the packaging and release step in CI.

- the `prebuilds` folder containing built `ffi` bindings
- the `standalone` folder containing the pact ruby standalone bindings is populated,
- the `binding.gyp` file is removed from the npm package, so `npm install` doesn't attempt to build the `ffi` buildings, that are prebuilt.

If you have a `binding.gyp` file, and have created `prebuilds` you will want to perform `npm ci` or `npm install` with `--ignore-scripts` set, to avoid building the `ffi` which is prebuilt.
Expand Down Expand Up @@ -51,44 +49,4 @@ npm test

```sh
act --container-architecture linux/amd64 -W .github/workflows/build-and-test.yml --artifact-server-path tmp
```

### MacOS ARM64 Task

#### Pre Reqs

1. Arm64 Mac
2. Cirrus-Cli
3. Tart.run


```sh
cirrus run --output github-actions macos_arm --artifacts-dir tmp
```

### Linux ARM64 Task

#### Pre Reqs

1. Arm64 Machine

### CI Locally

1. Arm64 Machine
2. Docker / Podman
3. Cirrus-Cli


```sh
cirrus run --output github-actions linux_arm --artifacts-dir tmp
```

#### Publishing Assets

MacOS ARM64

`cirrus run --output github-actions macos_arm --artifacts-dir tmp --environment GITHUB_TOKEN=$GITHUB_TOKEN --environment CIRRUS_RELEASE=test --environment CIRRUS_REPO_FULL_NAME=pact-foundation/pact-js-core;`

Linux ARM64

`cirrus run --output github-actions linux_arm --artifacts-dir tmp --environment GITHUB_TOKEN=$GITHUB_TOKEN --environment CIRRUS_RELEASE=test --environment CIRRUS_REPO_FULL_NAME=pact-foundation/pact-js-core;`
```
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@

# Pact-JS Core

A wrapper for the [Pact](http://pact.io) [CLI Tools](https://github.com/pact-foundation/pact-ruby-standalone).
A wrapper for the [Pact](http://pact.io) [FFI Library](https://github.com/pact-foundation/pact-reference).

<!-- TOC -->

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,7 @@
"lint:fix": "npm run lint -- --fix",
"prebuild": "npm run clean",
"download-libs": "npm run clean && bash script/download-libs.sh",
"clean-libs": "rimraf standalone/*.{js,map,d.ts} standalone/{windows**,linux**,darwin**} 'ffi'",
"clean-libs": "rimraf 'ffi'",
"build": "tsc --project tsconfig.build.json",
"prerelease": "npm run snyk-protect",
"release": "commit-and-tag-version",
Expand Down
9 changes: 0 additions & 9 deletions script/ci/download-standalone-and-test.sh

This file was deleted.

1 change: 0 additions & 1 deletion script/ci/release.sh
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,6 @@ if [ ! -z "${ONLY_DOWNLOAD_PACT_FOR_WINDOWS:-}" ]; then
fi

FETCH_ASSETS=true ./script/ci/check-release-libs.sh --fetch-assets -t "${NEXT_TAG}"
"$SCRIPT_DIR"/download-standalone-and-test.sh

if [[ ${DRY_RUN:-} == 'true' ]]; then
VERSION=$NEXT_VERSION
Expand Down
2 changes: 1 addition & 1 deletion script/ci/unpack-and-test.sh
Original file line number Diff line number Diff line change
Expand Up @@ -10,4 +10,4 @@ ls -1 artifact
mkdir -p prebuilds
mv artifact*/*.tar.gz . || echo "no mac prebuilds"
ls *.gz |xargs -n1 tar -xzf
./script/ci/download-standalone-and-test.sh
./script/ci/build-and-test.sh
5 changes: 0 additions & 5 deletions script/download-standalone.sh

This file was deleted.

30 changes: 0 additions & 30 deletions script/trigger-update.sh

This file was deleted.

0 comments on commit 8e68ac7

Please sign in to comment.