Skip to content

Conversation

Thirsty2
Copy link
Contributor

@Thirsty2 Thirsty2 commented Nov 3, 2020

This pull request eliminates the issue where a package may be built with an older installer if someone forgot to modify the version tag in the Dockerfile before tagging the version and pushing it. We had an issue where the 1.3.0 package was built from the 1.2.0 installer because the Dockerfile.use-installer file had a default version of 1.2.0.

Rather than changing the Dockerfile.use-installer file to the currently published version every time a new tagged version is released, set the default to a non-existent installer (v0.0.0) and inject the version automatically through the --build-arg TAG by getting it from the tagged version that is being pushed. This has been tested in the Thirsty2/quicklogic-fpga-toolchain repo, and works well as long as the tagged versions pushed to github are of the form vX.Y.Z where X, Y, and Z are integers, and v is the character 'v'. The installer has to exist and be downloadable through wget at a path produced automatically from this version. The v1.2.0 and v1.3.0 installers do exist in locations that adhere to the assumptions in this pull request.

@kkumar23 kkumar23 merged commit 38871d1 into QuickLogic-Corp:master Nov 4, 2020
Thirsty2 added a commit to Thirsty2/quicklogic-fpga-toolchain that referenced this pull request Nov 6, 2020
Merge pull request QuickLogic-Corp#42 from Thirsty2/dockerfile-use-installer-inject-…
@Thirsty2 Thirsty2 deleted the dockerfile-use-installer-inject-version-tag branch November 6, 2020 05:06
@kkumar23
Copy link
Contributor

kkumar23 commented Nov 6, 2020

@Thirsty2 : The image using github actions is not built, due to which docker option of 3A cannot be performed. ( Use a container image that is built automatically by a github action workflow)

@Thirsty2
Copy link
Contributor Author

Thirsty2 commented Nov 6, 2020

I noticed that the latest github action build failed due to a conda server side issue. There should be a 'Re-run jobs' link to re-run this action if you have permissions to do so. I don't see the link on the QuickLogic-Corp/quicklogic-fpga-toolchain myself, but I do see it on my own repo toward the right edge of the github actions page. This should fix the latest symbiflow-ql-src github actions package build. The source build worked successfully on the Thirsty2 repo yesterday after I synced it to the latest QuickLogic-corp master branch.

The easiest way to fix the 1.3.0 package (issue #41) is to remove the tag from the github repo and re-create it. You can delete it with:
git push --delete origin v1.3.0

Then re-create the tag from the latest master branch with something like:
git tag -a v1.3.0 -m "Build package with v1.3.0 installer."
git push origin v1.3.0

The latest master branch still uses the v1.3.0 installer and automatically builds with this merged fix that injects the TAG version through --build-arg TAG. The new package for 1.3.0 will be built with the v1.3.0 installer and the latest Dockerfile.use-installer that properly sets the permissions to allow non-root Docker users to run the tools.

@Thirsty2
Copy link
Contributor Author

Thirsty2 commented Nov 6, 2020

Also, I did successfully run the instructions from step 3A of the README.md file:

docker run -it docker.pkg.github.com/quicklogic-corp/quicklogic-fpga-toolchain/symbiflow-ql-src:latest bash
#Run any test case in the current terminal window. For example, follow these steps to run a test case:
cd /symbiflow-arch-defs/build/quicklogic/pp3/tests/quicklogic_testsuite/bin2seven
make bin2seven-ql-chandalar_fasm

#Or try:
cd /symbiflow-arch-defs/build/quicklogic/pp3/tests
make all_quick_tests

Perhaps we should note that pulling (or running) the container requires that the github user be authenticated. There is more info in the 'learn more' link at the top right of the package pages:
https://github.com/QuickLogic-Corp/quicklogic-fpga-toolchain/packages/414183

I am hopeful that github will eventually allow anonymous pulling of their package images, but for now you need to be authenticated as a github user.

Doug

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants