Skip to content

Commit

Permalink
Fix build system in CICD to match the new build system locally
Browse files Browse the repository at this point in the history
Stop publishing our flextesa image on every PR and just use the one that ECAD devs use when building locally
  • Loading branch information
Jimmy Chen Chen committed Nov 26, 2022
1 parent fb130b0 commit c349495
Show file tree
Hide file tree
Showing 3 changed files with 15 additions and 18 deletions.
21 changes: 9 additions & 12 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,6 @@ concurrency:
group: ${{ github.ref_name || github.ref }}
cancel-in-progress: true

env:
TAQ_VERSION: ${{ github.ref_name }}

jobs:
# When we use reusable we lose the ability to to filter out the workflow for changes to certain paths.
# This job creates boolean outputs based on path filters. These outputs can then be used as job conditions
Expand Down Expand Up @@ -89,6 +86,12 @@ jobs:
- name: Setup repo
uses: actions/checkout@v3

- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: lts/gallium
cache: "npm"

- name: Setup Deno
uses: denoland/setup-deno@v1
with:
Expand All @@ -102,9 +105,7 @@ jobs:
env:
DENO_DIR: "./deno"
run: |
BUILD=`git rev-parse --short "$GITHUB_SHA"`
TAQ_VERSION="${TAQ_VERSION/\//-}"
deno compile --output taq --allow-run --allow-write --allow-read --allow-env --allow-net --import-map ./import_map.json --no-prompt --target $DENO_TARGET index.ts --setBuild "$BUILD" --setVersion "$TAQ_VERSION" --lock ./deno-lock.json
npm run build:binary
./"${{ matrix.taqueria_bin }}" init -p ./test_project
if [ ! -f ./test_project/.taq/config.json ]; then
echo "Project not initialized"
Expand Down Expand Up @@ -213,11 +214,9 @@ jobs:

- name: Build all
run: |
BUILD=`git rev-parse --short "$GITHUB_SHA"`
TAQ_VERSION="${TAQ_VERSION/\//-}"
npx lerna bootstrap
npm run build:packages
deno compile --output taq --allow-run --allow-write --allow-read --allow-env --allow-net --import-map ./import_map.json --no-prompt index.ts --setBuild "$BUILD" --setVersion "$TAQ_VERSION" --lock ./deno-lock.json
npm run build:binary
npm run build:docker
- name: Run unit tests
Expand Down Expand Up @@ -277,11 +276,9 @@ jobs:

- name: Build all
run: |
BUILD=`git rev-parse --short "$GITHUB_SHA"`
TAQ_VERSION="${TAQ_VERSION/\//-}"
npx lerna bootstrap
npm run build:packages
deno compile --output taq --allow-run --allow-write --allow-read --allow-env --allow-net --import-map ./import_map.json --no-prompt index.ts --quickstart "`cat quickstart.md`" --setBuild "$BUILD" --setVersion "$TAQ_VERSION" --lock ./deno-lock.json
npm run build:binary
npm run build:docker
- name: Publish for PR
Expand Down
2 changes: 1 addition & 1 deletion bin/before-all-tests.sh
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
#!/usr/bin/env bash
set -e # exiting on error

docker ps # making sure docker is installed, running, and the user has permission
docker ps > /dev/null 2>&1 # making sure docker is installed, running, and the user has permission

rm -rf ./scrap
mkdir ./scrap
10 changes: 5 additions & 5 deletions bin/build-all.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ if [ "$0" == "./bin/build-all.sh" ] && [ -f index.ts ]; then
echo ""
echo '**********************************************'
echo "** Checking Dependencies"
docker ps
docker ps > /dev/null 2>&1

echo ""
echo '**********************************************'
Expand All @@ -19,13 +19,13 @@ if [ "$0" == "./bin/build-all.sh" ] && [ -f index.ts ]; then

echo ""
echo '**********************************************'
echo "** Building taqueria"
npm run build:binary
echo "** Building packages"
npm run build:packages

echo ""
echo '**********************************************'
echo "** Building packages"
npm run build:packages
echo "** Building taqueria"
npm run build:binary

echo ""
echo '**********************************************'
Expand Down

0 comments on commit c349495

Please sign in to comment.